diff options
author | Zac Medico <zmedico@gentoo.org> | 2006-08-27 10:15:43 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2006-08-27 10:15:43 +0000 |
commit | 104787f9d9092fdd15625cb05acaeb084eddce69 (patch) | |
tree | 9686b11aff66b23f7b106651fc2165e08645f570 | |
parent | 76441de8774b7fe57f8b9633c513603b13161b10 (diff) | |
download | portage-104787f9d9092fdd15625cb05acaeb084eddce69.tar.gz portage-104787f9d9092fdd15625cb05acaeb084eddce69.tar.bz2 portage-104787f9d9092fdd15625cb05acaeb084eddce69.zip |
For --newuse, ignore masked/forced flags when comparing IUSE. See bug #144661.
svn path=/main/trunk/; revision=4349
-rwxr-xr-x | bin/emerge | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/emerge b/bin/emerge index 35c1ef63c..9d6b8fa63 100755 --- a/bin/emerge +++ b/bin/emerge @@ -709,6 +709,7 @@ class depgraph: vardbapi = self.trees[myroot]["vartree"].dbapi portdb = self.trees[myroot]["porttree"].dbapi bindb = self.trees[myroot]["bintree"].dbapi + pkgsettings = self.pkgsettings[myroot] # if the package is already on the system, we add a "nomerge" # directive, otherwise we add a "merge" directive. @@ -753,12 +754,19 @@ class depgraph: --newuse is specified, we need to merge the package. """ if merging==0 and "--newuse" in self.myopts and \ vardbapi.cpv_exists(mykey): + pkgsettings.setcpv(mykey) + forced_flags = set() + forced_flags.update(pkgsettings.useforce) + forced_flags.update(pkgsettings.puseforce) + forced_flags.update(pkgsettings.usemask) + forced_flags.update(pkgsettings.pusemask) old_use = vardbapi.aux_get(mykey, ["USE"])[0].split() iuses = set(mydbapi.aux_get(mykey, ["IUSE"])[0].split()) + old_iuse = set(vardbapi.aux_get(mykey, ["IUSE"])[0].split()) if iuses.symmetric_difference( - vardbapi.aux_get(mykey, ["IUSE"])[0].split()): + old_iuse).difference(forced_flags): merging = 1 - elif iuses.intersection(old_use) != \ + elif old_iuse.intersection(old_use) != \ iuses.intersection(myuse): merging=1 |