From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id DFA94138D11 for ; Mon, 13 Jul 2015 12:38:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 27FDFE08D3; Mon, 13 Jul 2015 12:38:47 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7DCD8E08D3 for ; Mon, 13 Jul 2015 12:38:46 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2AF5434082B for ; Mon, 13 Jul 2015 12:38:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 35E1975E for ; Mon, 13 Jul 2015 12:38:43 +0000 (UTC) From: "Yuta SATOH" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Yuta SATOH" Message-ID: <1436791111.3e4b2faf25edc29cd6194fbb202b5e1271d9e856.yuta_satoh@gentoo> Subject: [gentoo-commits] proj/gentoo-bsd:master commit in: scripts/mkstages/ X-VCS-Repository: proj/gentoo-bsd X-VCS-Files: scripts/mkstages/create_forcestage3.sh X-VCS-Directories: scripts/mkstages/ X-VCS-Committer: yuta_satoh X-VCS-Committer-Name: Yuta SATOH X-VCS-Revision: 3e4b2faf25edc29cd6194fbb202b5e1271d9e856 X-VCS-Branch: master Date: Mon, 13 Jul 2015 12:38:43 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 312a0c93-24c4-4de0-acea-6154cfcd0644 X-Archives-Hash: a3912deaf9535eebd0658e9e818ee3ca commit: 3e4b2faf25edc29cd6194fbb202b5e1271d9e856 Author: Yuta SATOH gentoo gr jp> AuthorDate: Mon Jul 13 12:38:31 2015 +0000 Commit: Yuta SATOH gentoo gr 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}"