aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2013-02-10 12:06:15 -0800
committerBrian Dolbec <dolsen@gentoo.org>2014-09-10 21:26:53 -0700
commite0e22f1a8db5a1542860382bb2b1ebb78314411f (patch)
treed5ee0c2857e42530e535797443d4cf24d2d7d734
parentsetup_pkgmgr(): Make the 'build' use flag passed in (diff)
downloadcatalyst-e0e22f1a8db5a1542860382bb2b1ebb78314411f.tar.gz
catalyst-e0e22f1a8db5a1542860382bb2b1ebb78314411f.tar.bz2
catalyst-e0e22f1a8db5a1542860382bb2b1ebb78314411f.zip
Fix a bug that portage didn't get rebuilt with changed use flags
If clst_PGKCACHE is defined, --newuse was not being added to clst_myemergeopts, so then portage was not being rebuilt if portage was already up to date. Conflicts: targets/support/chroot-functions.sh
-rwxr-xr-xtargets/support/chroot-functions.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index ee820ede..3b7f77b4 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -170,14 +170,15 @@ 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 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 /etc/portage/make.conf ] && echo 'USE="${USE} $1"' >> /etc/portage/make.conf
- run_merge --oneshot --update sys-apps/portage
+ run_merge --oneshot --update --newuse 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
+ run_merge --oneshot --update --newuse sys-apps/portage
fi
}