Make config.setcpv() trigger regenerate() if the package from the
authorZac Medico <zmedico@gentoo.org>
Tue, 24 Aug 2010 01:37:59 +0000 (18:37 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 24 Aug 2010 01:37:59 +0000 (18:37 -0700)
previous setcpv  call had package.env settings which modified
FEATURES. This ensures that self.features is accurate (hopefully
solving the issue in bug #44796, comment #77).

pym/portage/package/ebuild/config.py

index 6e20b1cb7961864bf9c429d0293a6137f1119d89..d49b23552f09a0acedc0b61ec7832b1fe34c80d7 100644 (file)
@@ -1664,6 +1664,7 @@ class config(object):
                iuse = ""
                pkg_configdict = self.configdict["pkg"]
                previous_iuse = pkg_configdict.get("IUSE")
+               previous_features = pkg_configdict.get("FEATURES")
 
                aux_keys = self._setcpv_aux_keys
 
@@ -1743,6 +1744,13 @@ class config(object):
                self.configdict["pkg"]["PKGUSE"] = self.puse[:] # For saving to PUSE file
                self.configdict["pkg"]["USE"]    = self.puse[:] # this gets appended to USE
 
+               if previous_features:
+                       # The package from the previous setcpv call had package.env
+                       # settings which modified FEATURES. Therefore, trigger a
+                       # regenerate() call in order ensure that self.features
+                       # is accurate.
+                       has_changed = True
+
                self._penv = []
                cpdict = self._penvdict.get(cp)
                if cpdict: