Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-catalyst] [PATCH] targets: Drop setup_pkgmgr()
Date: Sat, 16 May 2020 00:28:33
Message-Id: 20200516002802.2661642-1-mattst88@gentoo.org
1 It's not safe to update portage this way. See
2
3 https://bugs.gentoo.org/722748
4
5 Additionally, it doesn't seem important to install/update the package
6 manager first. In all cases except stage1 the seed stage will have an
7 up-to-date package manager and in stage1 update_seed can handle that.
8
9 Signed-off-by: Matt Turner <mattst88@g.o>
10 ---
11 targets/embedded/chroot.sh | 2 --
12 targets/livecd-stage1/chroot.sh | 3 ---
13 targets/stage1/chroot.sh | 3 ---
14 targets/stage3/chroot.sh | 3 ---
15 targets/stage4/chroot.sh | 3 ---
16 targets/support/chroot-functions.sh | 16 ----------------
17 6 files changed, 30 deletions(-)
18
19 diff --git a/targets/embedded/chroot.sh b/targets/embedded/chroot.sh
20 index 56d40a4e..2fbba278 100755
21 --- a/targets/embedded/chroot.sh
22 +++ b/targets/embedded/chroot.sh
23 @@ -6,8 +6,6 @@ source /tmp/chroot-functions.sh
24 export DESTROOT="${clst_root_path}"
25 export clst_root_path="/"
26
27 -setup_pkgmgr
28 -
29 echo "Installing dependencies into ${DESTROOT}..."
30 run_merge -o "${clst_embedded_packages}"
31
32 diff --git a/targets/livecd-stage1/chroot.sh b/targets/livecd-stage1/chroot.sh
33 index 9ddf8d42..d143927e 100755
34 --- a/targets/livecd-stage1/chroot.sh
35 +++ b/targets/livecd-stage1/chroot.sh
36 @@ -2,7 +2,4 @@
37
38 source /tmp/chroot-functions.sh
39
40 -## START BUILD
41 -setup_pkgmgr
42 -
43 run_merge --update --deep --newuse "${clst_packages}"
44 diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
45 index b48fda65..9c7ef6ca 100755
46 --- a/targets/stage1/chroot.sh
47 +++ b/targets/stage1/chroot.sh
48 @@ -20,9 +20,6 @@ then
49 exit 1
50 fi
51
52 -## Setup seed pkgmgr to ensure latest
53 -clst_root_path=/ setup_pkgmgr "build"
54 -
55 # We need to ensure the base stage3 has USE="bindist"
56 # if BINDIST is set to avoid issues with openssl / openssh
57 [ -e ${clst_make_conf} ] && echo "USE=\"${BINDIST} ${USE}\"" >> ${clst_make_conf}
58 diff --git a/targets/stage3/chroot.sh b/targets/stage3/chroot.sh
59 index e6712015..37001db0 100755
60 --- a/targets/stage3/chroot.sh
61 +++ b/targets/stage3/chroot.sh
62 @@ -2,9 +2,6 @@
63
64 source /tmp/chroot-functions.sh
65
66 -## START BUILD
67 -setup_pkgmgr
68 -
69 export CONFIG_PROTECT="-* /etc/locale.gen"
70
71 echo "$locales" > /etc/locale.gen
72 diff --git a/targets/stage4/chroot.sh b/targets/stage4/chroot.sh
73 index d1838644..3b107e5c 100755
74 --- a/targets/stage4/chroot.sh
75 +++ b/targets/stage4/chroot.sh
76 @@ -2,9 +2,6 @@
77
78 source /tmp/chroot-functions.sh
79
80 -## START BUILD
81 -setup_pkgmgr
82 -
83 echo "Bringing system up to date using profile specific use flags"
84 run_merge -u @system
85
86 diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
87 index 2fe5ac00..993dc209 100755
88 --- a/targets/support/chroot-functions.sh
89 +++ b/targets/support/chroot-functions.sh
90 @@ -181,22 +181,6 @@ setup_gcc(){
91 fi
92 }
93
94 -setup_pkgmgr(){
95 - # We need to merge our package manager with USE="build" set in case it is
96 - # portage to avoid frying our /etc/portage/make.conf file. Otherwise, we could
97 - # just let emerge @system could merge it.
98 - # Use --update or portage might just waste time/cycles and reinstall the same version.
99 - # Use --newuse to make sure it rebuilds with any changed use flags.
100 - if [ -n "$1" ];then
101 - echo "Adding USE=\"\${USE} $1\" to make.conf for portage build"
102 - [ -e "${clst_make_conf}" ] && echo "USE=\"\${USE} $1\"" >> "${clst_make_conf}"
103 - run_merge --oneshot --update --newuse sys-apps/portage
104 - sed -i "/USE=\"\${USE} $1\"/d" "${clst_make_conf}"
105 - else
106 - run_merge --oneshot --update --newuse sys-apps/portage
107 - fi
108 -}
109 -
110 cleanup_distcc() {
111 LIBDIR=$(get_libdir)
112 rm -rf /etc/distcc/hosts
113 --
114 2.26.2

Replies

Subject Author
Re: [gentoo-catalyst] [PATCH] targets: Drop setup_pkgmgr() Brian Dolbec <dolsen@g.o>