From: Matt Turner <mattst88@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-catalyst] [PATCH] targets: Drop setup_pkgmgr()
Date: Fri, 15 May 2020 17:28:02 -0700 [thread overview]
Message-ID: <20200516002802.2661642-1-mattst88@gentoo.org> (raw)
It's not safe to update portage this way. See
https://bugs.gentoo.org/722748
Additionally, it doesn't seem important to install/update the package
manager first. In all cases except stage1 the seed stage will have an
up-to-date package manager and in stage1 update_seed can handle that.
Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
targets/embedded/chroot.sh | 2 --
targets/livecd-stage1/chroot.sh | 3 ---
targets/stage1/chroot.sh | 3 ---
targets/stage3/chroot.sh | 3 ---
targets/stage4/chroot.sh | 3 ---
targets/support/chroot-functions.sh | 16 ----------------
6 files changed, 30 deletions(-)
diff --git a/targets/embedded/chroot.sh b/targets/embedded/chroot.sh
index 56d40a4e..2fbba278 100755
--- a/targets/embedded/chroot.sh
+++ b/targets/embedded/chroot.sh
@@ -6,8 +6,6 @@ source /tmp/chroot-functions.sh
export DESTROOT="${clst_root_path}"
export clst_root_path="/"
-setup_pkgmgr
-
echo "Installing dependencies into ${DESTROOT}..."
run_merge -o "${clst_embedded_packages}"
diff --git a/targets/livecd-stage1/chroot.sh b/targets/livecd-stage1/chroot.sh
index 9ddf8d42..d143927e 100755
--- a/targets/livecd-stage1/chroot.sh
+++ b/targets/livecd-stage1/chroot.sh
@@ -2,7 +2,4 @@
source /tmp/chroot-functions.sh
-## START BUILD
-setup_pkgmgr
-
run_merge --update --deep --newuse "${clst_packages}"
diff --git a/targets/stage1/chroot.sh b/targets/stage1/chroot.sh
index b48fda65..9c7ef6ca 100755
--- a/targets/stage1/chroot.sh
+++ b/targets/stage1/chroot.sh
@@ -20,9 +20,6 @@ then
exit 1
fi
-## Setup seed pkgmgr to ensure latest
-clst_root_path=/ setup_pkgmgr "build"
-
# We need to ensure the base stage3 has USE="bindist"
# if BINDIST is set to avoid issues with openssl / openssh
[ -e ${clst_make_conf} ] && echo "USE=\"${BINDIST} ${USE}\"" >> ${clst_make_conf}
diff --git a/targets/stage3/chroot.sh b/targets/stage3/chroot.sh
index e6712015..37001db0 100755
--- a/targets/stage3/chroot.sh
+++ b/targets/stage3/chroot.sh
@@ -2,9 +2,6 @@
source /tmp/chroot-functions.sh
-## START BUILD
-setup_pkgmgr
-
export CONFIG_PROTECT="-* /etc/locale.gen"
echo "$locales" > /etc/locale.gen
diff --git a/targets/stage4/chroot.sh b/targets/stage4/chroot.sh
index d1838644..3b107e5c 100755
--- a/targets/stage4/chroot.sh
+++ b/targets/stage4/chroot.sh
@@ -2,9 +2,6 @@
source /tmp/chroot-functions.sh
-## START BUILD
-setup_pkgmgr
-
echo "Bringing system up to date using profile specific use flags"
run_merge -u @system
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index 2fe5ac00..993dc209 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -181,22 +181,6 @@ setup_gcc(){
fi
}
-setup_pkgmgr(){
- # We need to merge our package manager with USE="build" set in case it is
- # portage to avoid frying our /etc/portage/make.conf file. Otherwise, we could
- # just let emerge @system could merge it.
- # Use --update or portage might just waste time/cycles and reinstall the same version.
- # Use --newuse to make sure it rebuilds with any changed use flags.
- if [ -n "$1" ];then
- echo "Adding USE=\"\${USE} $1\" to make.conf for portage build"
- [ -e "${clst_make_conf}" ] && echo "USE=\"\${USE} $1\"" >> "${clst_make_conf}"
- run_merge --oneshot --update --newuse sys-apps/portage
- sed -i "/USE=\"\${USE} $1\"/d" "${clst_make_conf}"
- else
- run_merge --oneshot --update --newuse sys-apps/portage
- fi
-}
-
cleanup_distcc() {
LIBDIR=$(get_libdir)
rm -rf /etc/distcc/hosts
--
2.26.2
next reply other threads:[~2020-05-16 0:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-16 0:28 Matt Turner [this message]
2020-05-16 1:43 ` [gentoo-catalyst] [PATCH] targets: Drop setup_pkgmgr() 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=20200516002802.2661642-1-mattst88@gentoo.org \
--to=mattst88@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