commit:     e0e22f1a8db5a1542860382bb2b1ebb78314411f
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 10 20:06:15 2013 +0000
Commit:     Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Thu Sep 11 04:26:53 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=e0e22f1a

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

---
 targets/support/chroot-functions.sh | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/targets/support/chroot-functions.sh 
b/targets/support/chroot-functions.sh
index ee820ed..3b7f77b 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
 }
 

Reply via email to