repoman: fix random package.use.stable.* failure v2.2.0_alpha173
authorZac Medico <zmedico@gentoo.org>
Fri, 12 Apr 2013 07:20:35 +0000 (00:20 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 12 Apr 2013 07:20:35 +0000 (00:20 -0700)
It failed to work randomly, since setcpv did not always use the correct
value for the effective ACCEPT_KEYWORDS of the current profile.

bin/repoman

index c55fb04f6073f502664e572f7c52210cf2821b13..b9486315903a39d72226e2276d4b3edbd24e2719 100755 (executable)
@@ -2265,8 +2265,7 @@ for x in effective_scanlist:
                                trees[root]["porttree"].settings = dep_settings
                                portdb.settings = dep_settings
                                portdb.xcache = xcache
-                               # for package.use.mask support inside dep_check
-                               dep_settings.setcpv(pkg)
+
                                dep_settings["ACCEPT_KEYWORDS"] = " ".join(groups)
                                # just in case, prevent config.reset() from nuking these.
                                dep_settings.backup_changes("ACCEPT_KEYWORDS")
@@ -2279,6 +2278,13 @@ for x in effective_scanlist:
                                # dependencies may conflict (see bug #456342).
                                dep_settings._parent_stable = dep_settings._isStable(pkg)
 
+                               # Handle package.use*.{force,mask) calculation, for use
+                               # in dep_check.
+                               dep_settings.useforce = dep_settings._use_manager.getUseForce(
+                                       pkg, stable=dep_settings._parent_stable)
+                               dep_settings.usemask = dep_settings._use_manager.getUseMask(
+                                       pkg, stable=dep_settings._parent_stable)
+
                                if not baddepsyntax:
                                        ismasked = not ebuild_archs or \
                                                pkg.cpv not in portdb.xmatch("match-visible", pkg.cp)