fix AttributeError in recent use dep changes
authorZac Medico <zmedico@gentoo.org>
Wed, 1 Dec 2010 00:46:52 +0000 (16:46 -0800)
committerZac Medico <zmedico@gentoo.org>
Sat, 4 Dec 2010 06:27:39 +0000 (22:27 -0800)
pym/portage/dbapi/__init__.py
pym/portage/dep/__init__.py

index 7d137b0bbde7e8a60eee08e681f05c0d8c394930..555125ac510e5d830ce65bc926ca4c565ec7124d 100644 (file)
@@ -160,7 +160,9 @@ class dbapi(object):
                                        break
                        if missing_iuse:
                                continue
-                       if not self._use_mutable:
+                       if not atom.use:
+                               pass
+                       elif not self._use_mutable:
                                missing_enabled = atom.use.missing_enabled.difference(iuse)
                                missing_disabled = atom.use.missing_disabled.difference(iuse)
 
index baf0fc3fce542ed5ef411fe65844909453812ec2..1f956e39bd594b56209ed384e7c0417dd41c8f69 100644 (file)
@@ -1936,26 +1936,28 @@ def match_from_list(mydep, candidate_list):
                                        mydep.unevaluated_atom.use.required):
                                        continue
 
-                               missing_enabled = mydep.use.missing_enabled.difference(x.iuse.all)
-                               missing_disabled = mydep.use.missing_disabled.difference(x.iuse.all)
-
-                               if mydep.use.enabled:
-                                       if mydep.use.enabled.intersection(missing_disabled):
-                                               continue
-                                       need_enabled = mydep.use.enabled.difference(use.enabled)
-                                       if need_enabled:
-                                               need_enabled = need_enabled.difference(missing_enabled)
-                                               if need_enabled:
+                               if mydep.use:
+
+                                       missing_enabled = mydep.use.missing_enabled.difference(x.iuse.all)
+                                       missing_disabled = mydep.use.missing_disabled.difference(x.iuse.all)
+
+                                       if mydep.use.enabled:
+                                               if mydep.use.enabled.intersection(missing_disabled):
                                                        continue
+                                               need_enabled = mydep.use.enabled.difference(use.enabled)
+                                               if need_enabled:
+                                                       need_enabled = need_enabled.difference(missing_enabled)
+                                                       if need_enabled:
+                                                               continue
 
-                               if mydep.use.disabled:
-                                       if mydep.use.disabled.intersection(missing_enabled):
-                                               continue
-                                       need_disabled = mydep.use.disabled.intersection(use.enabled)
-                                       if need_disabled:
-                                               need_disabled = need_disabled.difference(missing_disabled)
-                                               if need_disabled:
+                                       if mydep.use.disabled:
+                                               if mydep.use.disabled.intersection(missing_enabled):
                                                        continue
+                                               need_disabled = mydep.use.disabled.intersection(use.enabled)
+                                               if need_disabled:
+                                                       need_disabled = need_disabled.difference(missing_disabled)
+                                                       if need_disabled:
+                                                               continue
 
                        mylist.append(x)