Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH 6/7] setup_pkgmgr(): WIP Make the 'build' use flag optional
Date: Tue, 09 Sep 2014 18:27:51
Message-Id: 20140909112741.2757ea00.dolsen@gentoo.org
In Reply to: [gentoo-catalyst] [PATCH 6/7] setup_pkgmgr(): WIP Make the 'build' use flag optional by Brian Dolbec
1 On Mon, 1 Sep 2014 19:31:40 -0700
2 Brian Dolbec <dolsen@g.o> wrote:
3
4 > ---
5 > targets/stage1/stage1-chroot.sh | 1 +
6 > targets/stage2/stage2-chroot.sh | 1 +
7 > targets/support/chroot-functions.sh | 13 ++++++++++---
8 > 3 files changed, 12 insertions(+), 3 deletions(-)
9 >
10
11 Here is an updated patch based on discussions with Rick.
12
13 From 52024ff70bf044f026330efd5a167139649d529a Mon Sep 17 00:00:00 2001
14 From: Brian Dolbec <dolsen@g.o>
15 Date: Mon, 1 Sep 2014 15:10:38 -0700
16 Subject: [PATCH] setup_pkgmgr(): Make the 'build' use flag passed in
17 To: gentoo-catalyst@l.g.o
18
19 The "build" USE flag is only needed for the stage1 build.
20 It also causes other errors in later stages.
21 This makes setup_pkgmgr() takes an optional USE flag string
22 parameter to be added to the USE variable.
23 ---
24 targets/stage1/stage1-chroot.sh | 2 +-
25 targets/support/chroot-functions.sh | 13 ++++++++++---
26 2 files changed, 11 insertions(+), 4 deletions(-)
27
28 diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh
29 index ed83f38..eccbd3f 100755
30 --- a/targets/stage1/stage1-chroot.sh
31 +++ b/targets/stage1/stage1-chroot.sh
32 @@ -21,7 +21,7 @@ then
33 fi
34
35 ## Setup seed pkgmgr to ensure latest
36 -clst_root_path=/ setup_pkgmgr
37 +clst_root_path=/ setup_pkgmgr "build"
38
39 # Update stage3
40 if [ -n "${clst_update_seed}" ]; then
41 diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
42 index 3495f14..0659ee0 100755
43 --- a/targets/support/chroot-functions.sh
44 +++ b/targets/support/chroot-functions.sh
45 @@ -170,9 +170,16 @@ setup_pkgmgr(){
46 # portage to avoid frying our /etc/portage/make.conf file. Otherwise, we could
47 # just let emerge @system could merge it.
48 # Use --update or portage will reinstall the same version.
49 - [ -e /etc/portage/make.conf ] && echo 'USE="${USE} build"' >> /etc/portage/make.conf
50 - run_merge --oneshot --update sys-apps/portage
51 - sed -i '/USE="${USE} build"/d' /etc/portage/make.conf
52 + if [ -n "$1" ];then
53 + echo "Adding USE='${USE} $1' to make.conf for portage build"
54 + [ -e /etc/portage/make.conf ] && echo 'USE="${USE} $1"' >> /etc/portage/make.conf
55 + run_merge --oneshot --update sys-apps/portage
56 + sed -i '/USE="${USE} $1"/d' /etc/portage/make.conf
57 + else
58 + echo "Updating portage with USE='${USE}'"
59 + run_merge --oneshot --update sys-apps/portage
60 + fi
61 +
62 }
63
64 cleanup_distcc() {
65 --
66 2.1.0
67
68
69
70 --
71 Brian Dolbec <dolsen>