summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-01-28 14:48:58 +0000
committerZac Medico <zmedico@gentoo.org>2010-01-28 14:48:58 +0000
commit3c29ef50d86257960104d6654a17e618fd1cd94a (patch)
tree269908c868bec7e871e798fb7ad19bf2e0bdca1d
parent717af58e0855d8c2251ec99129b8c4e892a84257 (diff)
downloadportage-3c29ef50d86257960104d6654a17e618fd1cd94a.tar.gz
portage-3c29ef50d86257960104d6654a17e618fd1cd94a.tar.bz2
portage-3c29ef50d86257960104d6654a17e618fd1cd94a.zip
Fix AttributeError from has_versions for atoms with no USE deps. Thanks to
Arfrever for reporting. svn path=/main/trunk/; revision=15214
-rwxr-xr-xbin/portageq4
-rw-r--r--pym/portage/dep.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/bin/portageq b/bin/portageq
index e02a9ddbb..8d6c12e23 100755
--- a/bin/portageq
+++ b/bin/portageq
@@ -47,8 +47,8 @@ from portage import os
from portage.util import writemsg, writemsg_stdout
def eval_atom_use(atom):
- if atom.use.conditional and 'USE' in os.environ:
- use = os.environ['USE'].split()
+ if 'USE' in os.environ:
+ use = frozenset(os.environ['USE'].split())
atom = atom.evaluate_conditionals(use)
return atom
diff --git a/pym/portage/dep.py b/pym/portage/dep.py
index c241408a5..fe3f04f59 100644
--- a/pym/portage/dep.py
+++ b/pym/portage/dep.py
@@ -620,7 +620,7 @@ class Atom(_atom_base):
@rtype: Atom
@return: an atom instance with any USE conditionals evaluated
"""
- if not self.use.conditional:
+ if not (self.use and self.use.conditional):
return self
atom = remove_slot(self)
if self.slot: