1 |
Author: zmedico |
2 |
Date: 2010-01-29 18:52:28 +0000 (Fri, 29 Jan 2010) |
3 |
New Revision: 15265 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.7/bin/portageq |
7 |
main/branches/2.1.7/pym/portage/dep.py |
8 |
Log: |
9 |
Fix AttributeError from has_versions for atoms with no USE deps. Thanks to |
10 |
Arfrever for reporting. (trunk r15214) |
11 |
|
12 |
Modified: main/branches/2.1.7/bin/portageq |
13 |
=================================================================== |
14 |
--- main/branches/2.1.7/bin/portageq 2010-01-29 18:52:20 UTC (rev 15264) |
15 |
+++ main/branches/2.1.7/bin/portageq 2010-01-29 18:52:28 UTC (rev 15265) |
16 |
@@ -47,8 +47,8 @@ |
17 |
from portage.util import writemsg, writemsg_stdout |
18 |
|
19 |
def eval_atom_use(atom): |
20 |
- if atom.use.conditional and 'USE' in os.environ: |
21 |
- use = os.environ['USE'].split() |
22 |
+ if 'USE' in os.environ: |
23 |
+ use = frozenset(os.environ['USE'].split()) |
24 |
atom = atom.evaluate_conditionals(use) |
25 |
return atom |
26 |
|
27 |
|
28 |
Modified: main/branches/2.1.7/pym/portage/dep.py |
29 |
=================================================================== |
30 |
--- main/branches/2.1.7/pym/portage/dep.py 2010-01-29 18:52:20 UTC (rev 15264) |
31 |
+++ main/branches/2.1.7/pym/portage/dep.py 2010-01-29 18:52:28 UTC (rev 15265) |
32 |
@@ -620,7 +620,7 @@ |
33 |
@rtype: Atom |
34 |
@return: an atom instance with any USE conditionals evaluated |
35 |
""" |
36 |
- if not self.use.conditional: |
37 |
+ if not (self.use and self.use.conditional): |
38 |
return self |
39 |
atom = remove_slot(self) |
40 |
if self.slot: |