Gentoo Archives: gentoo-commits

From: "Zac Medico (zmedico)" <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] portage r15214 - in main/trunk: bin pym/portage
Date: Thu, 28 Jan 2010 14:49:01
Message-Id: E1NaVg3-00009E-1E@stork.gentoo.org
1 Author: zmedico
2 Date: 2010-01-28 14:48:58 +0000 (Thu, 28 Jan 2010)
3 New Revision: 15214
4
5 Modified:
6 main/trunk/bin/portageq
7 main/trunk/pym/portage/dep.py
8 Log:
9 Fix AttributeError from has_versions for atoms with no USE deps. Thanks to
10 Arfrever for reporting.
11
12
13 Modified: main/trunk/bin/portageq
14 ===================================================================
15 --- main/trunk/bin/portageq 2010-01-28 05:38:38 UTC (rev 15213)
16 +++ main/trunk/bin/portageq 2010-01-28 14:48:58 UTC (rev 15214)
17 @@ -47,8 +47,8 @@
18 from portage.util import writemsg, writemsg_stdout
19
20 def eval_atom_use(atom):
21 - if atom.use.conditional and 'USE' in os.environ:
22 - use = os.environ['USE'].split()
23 + if 'USE' in os.environ:
24 + use = frozenset(os.environ['USE'].split())
25 atom = atom.evaluate_conditionals(use)
26 return atom
27
28
29 Modified: main/trunk/pym/portage/dep.py
30 ===================================================================
31 --- main/trunk/pym/portage/dep.py 2010-01-28 05:38:38 UTC (rev 15213)
32 +++ main/trunk/pym/portage/dep.py 2010-01-28 14:48:58 UTC (rev 15214)
33 @@ -620,7 +620,7 @@
34 @rtype: Atom
35 @return: an atom instance with any USE conditionals evaluated
36 """
37 - if not self.use.conditional:
38 + if not (self.use and self.use.conditional):
39 return self
40 atom = remove_slot(self)
41 if self.slot: