When accessing pkgsettings.features inside Scheduler._generate_digests(),
authorZac Medico <zmedico@gentoo.org>
Sat, 21 Aug 2010 14:18:47 +0000 (07:18 -0700)
committerZac Medico <zmedico@gentoo.org>
Sat, 21 Aug 2010 14:18:47 +0000 (07:18 -0700)
ensure that we are using global features settings rather than those
from package.env.

pym/_emerge/Scheduler.py

index 2a052af4cf3f06e13819f904bbeafab8c8a613ca..1c732c3090d80d5016be3c8e3e26f703c74d69d0 100644 (file)
@@ -648,6 +648,10 @@ class Scheduler(PollScheduler):
                digest = '--digest' in self.myopts
                if not digest:
                        for pkgsettings in self.pkgsettings.values():
+                               if pkgsettings.mycpv is not None:
+                                       # ensure that we are using global features
+                                       # settings rather than those from package.env
+                                       pkgsettings.reset()
                                if 'digest' in pkgsettings.features:
                                        digest = True
                                        break
@@ -661,6 +665,10 @@ class Scheduler(PollScheduler):
                                x.operation != 'merge':
                                continue
                        pkgsettings = self.pkgsettings[x.root]
+                       if pkgsettings.mycpv is not None:
+                               # ensure that we are using global features
+                               # settings rather than those from package.env
+                               pkgsettings.reset()
                        if '--digest' not in self.myopts and \
                                'digest' not in pkgsettings.features:
                                continue