public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Yuta SATOH" <nigoro@gentoo.gr.jp>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/
Date: Mon, 13 Jul 2015 12:38:43 +0000 (UTC)	[thread overview]
Message-ID: <1436791111.3e4b2faf25edc29cd6194fbb202b5e1271d9e856.yuta_satoh@gentoo> (raw)

commit:     3e4b2faf25edc29cd6194fbb202b5e1271d9e856
Author:     Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Mon Jul 13 12:38:31 2015 +0000
Commit:     Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
CommitDate: Mon Jul 13 12:38:31 2015 +0000
URL:        https://gitweb.gentoo.org/proj/gentoo-bsd.git/commit/?id=3e4b2faf

create_forcestage3.sh: fixed some issues. tested amd64/10.1, amd64/10.1/clang, x86/10.1.

 scripts/mkstages/create_forcestage3.sh | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/scripts/mkstages/create_forcestage3.sh b/scripts/mkstages/create_forcestage3.sh
index 515aae2..e0aff8c 100644
--- a/scripts/mkstages/create_forcestage3.sh
+++ b/scripts/mkstages/create_forcestage3.sh
@@ -14,6 +14,15 @@ prepare(){
 	local distdir="$(emerge --info | grep DISTDIR | sed s:DISTDIR=::g | sed 's:"::g')"
 	if [[ ! -d "${WORKDIR}" ]]; then
 		mkdir -p "${WORKDIR}"
+	else
+		echo "${WORKDIR} exists."
+		echo "Please remove the following steps."
+		echo ""
+		echo "kill -9 $(ps auxw | grep ebuild-helpers/ecompressdir | grep -v grep | awk '{ print $2 }' | xargs)"
+		echo "umount $(mount | grep ${WORKDIR} | awk '{print $3}' | xargs)"
+		echo "umount $(mount | grep ${WORKDIR} | awk '{print $3}' | xargs)"
+		echo "chflags -R noschg \"${WORKDIR}\" && rm -rf \"${WORKDIR}\""
+		exit 1
 	fi
 
 	if [[ "${OLDSTAGE3}" =~ ^http ]]; then
@@ -56,6 +65,9 @@ chroot_update(){
 	export EMERGE_DEFAULT_OPTS="-q"
 	chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} kernel
 	chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} freebsd_userland
+	if [[ -e "${WORKDIR}"/usr/bin/git ]]; then
+		chroot "${WORKDIR}" emerge -C dev-vcs/git
+	fi
 	REMOVEPERL=1 chroot "${WORKDIR}" bash /automatic_updater.sh ${TARGETVER} world
 	unset EMERGE_DEFAULT_OPTS
 }
@@ -74,8 +86,13 @@ check_ecompressdir() {
 }
 
 cleanup(){
+	local distdir="$(emerge --info | grep DISTDIR | sed s:DISTDIR=::g | sed 's:"::g')"
+
 	check_ecompressdir
-	umount "${WORKDIR}"/usr/portage/distfiles
+	if [[ ! "${distdir}" =~ ${PORTDIR}.* ]]; then
+		echo "unmount DISTDIR"
+		umount "${WORKDIR}"/usr/portage/distfiles
+	fi
 	umount "${WORKDIR}"/usr/portage
 	if [[ "${TMPFS}" -ne 0 ]] ; then
 		umount "${WORKDIR}"/var/tmp/portage
@@ -91,12 +108,13 @@ create_stage3(){
 		mkdir -p /var/tmp/catalyst/builds/default
 	fi
 	if [[ ${CLANG} -ne 0 ]]; then
-		tarfile="stage3-${TARGETARCH}-fbsd-${TAGETVER}-forcestage3-cl"
+		tarfile="stage3-${TARGETARCH}-fbsd-${TARGETVER}-forcestage3-cl"
 	else
-		tarfile="stage3-${TARGETARCH}-fbsd-${TAGETVER}-forcestage3"
+		tarfile="stage3-${TARGETARCH}-fbsd-${TARGETVER}-forcestage3"
 	fi
 
-	tar cjpf /var/tmp/catalyst/builds/default/"${tarfile}".tar.bz2 .
+	echo "Compress with tar."
+	LANG="en_US.UTF-8" tar cjpf /var/tmp/catalyst/builds/default/"${tarfile}".tar.bz2 .
 
 	echo "Complete !"
 	echo "Set FORCESTAGE3=${tarfile}"


             reply	other threads:[~2015-07-13 12:38 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 12:38 Yuta SATOH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-12-09 22:29 [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/ Yuta SATOH
2017-12-09 22:29 Yuta SATOH
2017-12-07 13:39 Yuta SATOH
2017-12-07 13:39 Yuta SATOH
2017-12-07 13:39 Yuta SATOH
2015-07-12  7:55 Yuta SATOH
2015-07-12  7:49 Yuta SATOH
2015-07-12  4:43 Yuta SATOH
2015-07-12  4:43 Yuta SATOH
2015-07-11 23:32 Yuta SATOH
2015-02-13 11:27 Yuta SATOH
2015-02-12 15:09 Yuta SATOH
2014-11-16  7:44 Yuta SATOH
2014-11-15 16:31 Yuta SATOH
2014-11-15 16:31 Yuta SATOH
2014-10-29 12:16 Yuta SATOH
2014-10-28 12:03 Yuta SATOH
2013-08-29 13:46 Yuta SATOH
2013-07-29 11:41 Yuta SATOH
2013-06-23 14:20 Yuta SATOH
2013-03-09 16:20 Yuta SATOH
2012-12-29  9:16 Yuta SATOH
2012-12-24 14:26 Yuta SATOH
2012-12-12 11:34 Yuta SATOH
2012-12-11 13:21 Yuta SATOH
2012-11-23 13:06 Yuta SATOH
2012-11-22 14:32 Yuta SATOH
2012-11-22 12:26 Yuta SATOH
2012-10-13  9:33 Yuta SATOH
2012-10-12 15:25 Yuta SATOH
2012-10-06  7:13 Yuta SATOH
2012-08-25  1:24 Yuta SATOH
2012-08-03 13:58 Yuta SATOH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1436791111.3e4b2faf25edc29cd6194fbb202b5e1271d9e856.yuta_satoh@gentoo \
    --to=nigoro@gentoo.gr.jp \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox