public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] [PATCH 6/7] setup_pkgmgr(): WIP Make the 'build' use flag optional
Date: Tue, 9 Sep 2014 11:27:41 -0700	[thread overview]
Message-ID: <20140909112741.2757ea00.dolsen@gentoo.org> (raw)
In-Reply-To: <1409625101-27112-7-git-send-email-dolsen@gentoo.org>

On Mon,  1 Sep 2014 19:31:40 -0700
Brian Dolbec <dolsen@gentoo.org> wrote:

> ---
>  targets/stage1/stage1-chroot.sh     |  1 +
>  targets/stage2/stage2-chroot.sh     |  1 +
>  targets/support/chroot-functions.sh | 13 ++++++++++---
>  3 files changed, 12 insertions(+), 3 deletions(-)
> 

Here is an updated patch based on discussions with Rick.

From 52024ff70bf044f026330efd5a167139649d529a Mon Sep 17 00:00:00 2001
From: Brian Dolbec <dolsen@gentoo.org>
Date: Mon, 1 Sep 2014 15:10:38 -0700
Subject: [PATCH] setup_pkgmgr(): Make the 'build' use flag passed in
To: gentoo-catalyst@lists.gentoo.org

The "build" USE flag is only needed for the stage1 build.
It also causes other errors in later stages.
This makes setup_pkgmgr() takes an optional USE flag string
parameter to be added to the USE variable.
---
 targets/stage1/stage1-chroot.sh     |  2 +-
 targets/support/chroot-functions.sh | 13 ++++++++++---
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh
index ed83f38..eccbd3f 100755
--- a/targets/stage1/stage1-chroot.sh
+++ b/targets/stage1/stage1-chroot.sh
@@ -21,7 +21,7 @@ then
 fi
 
 ## Setup seed pkgmgr to ensure latest
-clst_root_path=/ setup_pkgmgr
+clst_root_path=/ setup_pkgmgr "build"
 
 # Update stage3
 if [ -n "${clst_update_seed}" ]; then
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 3495f14..0659ee0 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -170,9 +170,16 @@ setup_pkgmgr(){
 	# portage to avoid frying our /etc/portage/make.conf file.  Otherwise, we could
 	# just let emerge @system could merge it.
 	# Use --update or portage will reinstall the same version.
-	[ -e /etc/portage/make.conf ] && echo 'USE="${USE} build"' >> /etc/portage/make.conf
-	run_merge --oneshot --update sys-apps/portage
-	sed -i '/USE="${USE} build"/d' /etc/portage/make.conf
+	if [ -n "$1" ];then
+		echo "Adding USE='${USE} $1' to make.conf for portage build"
+		[ -e /etc/portage/make.conf ] && echo 'USE="${USE} $1"' >> /etc/portage/make.conf
+		run_merge --oneshot --update sys-apps/portage
+		sed -i '/USE="${USE} $1"/d' /etc/portage/make.conf
+	else
+		echo "Updating portage with USE='${USE}'"
+		run_merge --oneshot --update sys-apps/portage
+	fi
+
 }
 
 cleanup_distcc() {
-- 
2.1.0



-- 
Brian Dolbec <dolsen>



  reply	other threads:[~2014-09-09 18:27 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-02  2:31 [gentoo-catalyst] [PATCH 0/7] Pending branch patches (various) Brian Dolbec
2014-09-02  2:31 ` [gentoo-catalyst] [PATCH 1/7] Remove unused urllib import Brian Dolbec
2014-09-02  5:22   ` W. Trevor King
2014-09-02  2:31 ` [gentoo-catalyst] [PATCH 2/7] Remove unused variable new and an undefined variable s Brian Dolbec
2014-09-02  5:43   ` W. Trevor King
2014-09-05 18:16     ` W. Trevor King
2014-09-02  2:31 ` [gentoo-catalyst] [PATCH 3/7] stage1-controller.sh: Fix portage bin path hard coding Brian Dolbec
2014-09-02  3:35   ` Rick "Zero_Chaos" Farina
2014-09-02  5:05   ` [gentoo-catalyst] [PATCH v2] stage1-controller.sh: Remove some old poor cleaning code Brian Dolbec
2014-09-02  5:19     ` [gentoo-catalyst] [PATCH v2 3/7] " Brian Dolbec
2014-09-02  5:31     ` [gentoo-catalyst] [PATCH v2] " W. Trevor King
2014-09-09 18:38     ` Brian Dolbec
2014-09-10 17:16       ` Rick "Zero_Chaos" Farina
2014-09-10 21:00         ` Anthony G. Basile
2014-09-02  2:31 ` [gentoo-catalyst] [PATCH 4/7] chroot-functions.sh: Remove --nodeps option from portage update Brian Dolbec
2014-09-02  2:31 ` [gentoo-catalyst] [PATCH 5/7] chroot-functions.sh: Fix a mis-worded comment Brian Dolbec
2014-09-02  2:31 ` [gentoo-catalyst] [PATCH 6/7] setup_pkgmgr(): WIP Make the 'build' use flag optional Brian Dolbec
2014-09-09 18:27   ` Brian Dolbec [this message]
2014-09-02  2:31 ` [gentoo-catalyst] [PATCH 7/7] Fix a relative path bug Brian Dolbec
2014-09-02  5:06   ` W. Trevor King
2014-09-02  5:26     ` Brian Dolbec
2014-09-09 17:20       ` Brian Dolbec
2014-09-11  3:30 ` [gentoo-catalyst] [PATCH 0/7] Pending branch patches (various) Brian Dolbec

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=20140909112741.2757ea00.dolsen@gentoo.org \
    --to=dolsen@gentoo.org \
    --cc=gentoo-catalyst@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