In config.setcpv() reuse split USE from built packages instead of splitting
authorZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 21:45:55 +0000 (21:45 -0000)
committerZac Medico <zmedico@gentoo.org>
Thu, 30 Apr 2009 21:45:55 +0000 (21:45 -0000)
them again. (trunk r13573)

svn path=/main/branches/2.1.6/; revision=13574

pym/portage/__init__.py

index d09797f07106efc12c96d0845a3ce4f28e567fa7..68d0377985e52262013800c43d681796320af584 100644 (file)
@@ -2082,8 +2082,7 @@ class config(object):
                        settings = self.settings
                        use = self.built_use
                        if use is None:
-                               use = settings['PORTAGE_USE']
-                       use = set(use.split())
+                               use = frozenset(settings['PORTAGE_USE'].split())
                        values['ACCEPT_LICENSE'] = self._accept_license(use, settings)
                        values['PORTAGE_RESTRICT'] = self._restrict(use, settings)
                        return values
@@ -2222,7 +2221,7 @@ class config(object):
                        mydb = pkg.metadata
                        args_hash = (mycpv, id(pkg))
                        if pkg.built:
-                               built_use = pkg.metadata['USE']
+                               built_use = pkg.use.enabled
                else:
                        args_hash = (mycpv, id(mydb))