1 |
commit: 47029cd18764795a4c2cff1f985c56c87ca07ed9 |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jul 2 20:27:57 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jul 2 20:27:57 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=47029cd1 |
7 |
|
8 |
Atom: evaluate_conditionals slot-abi, bug #424489 |
9 |
|
10 |
--- |
11 |
pym/portage/dep/__init__.py | 38 +++++++++++++++++++++++++++++++------- |
12 |
1 files changed, 31 insertions(+), 7 deletions(-) |
13 |
|
14 |
diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py |
15 |
index 557c92b..c722e48 100644 |
16 |
--- a/pym/portage/dep/__init__.py |
17 |
+++ b/pym/portage/dep/__init__.py |
18 |
@@ -1428,8 +1428,14 @@ class Atom(_unicode): |
19 |
|
20 |
def with_repo(self, repo): |
21 |
atom = remove_slot(self) |
22 |
+ if self.slot is not None or self.slot_abi_op is not None: |
23 |
+ atom += _slot_separator |
24 |
if self.slot is not None: |
25 |
- atom += _slot_separator + self.slot |
26 |
+ atom += self.slot |
27 |
+ if self.slot_abi is not None: |
28 |
+ atom += "/%s" % self.slot_abi |
29 |
+ if self.slot_abi_op is not None: |
30 |
+ atom += self.slot_abi_op |
31 |
atom += _repo_separator + repo |
32 |
if self.use is not None: |
33 |
atom += _unicode(self.use) |
34 |
@@ -1489,8 +1495,14 @@ class Atom(_unicode): |
35 |
if not (self.use and self.use.conditional): |
36 |
return self |
37 |
atom = remove_slot(self) |
38 |
- if self.slot: |
39 |
- atom += ":%s" % self.slot |
40 |
+ if self.slot is not None or self.slot_abi_op is not None: |
41 |
+ atom += _slot_separator |
42 |
+ if self.slot is not None: |
43 |
+ atom += self.slot |
44 |
+ if self.slot_abi is not None: |
45 |
+ atom += "/%s" % self.slot_abi |
46 |
+ if self.slot_abi_op is not None: |
47 |
+ atom += self.slot_abi_op |
48 |
use_dep = self.use.evaluate_conditionals(use) |
49 |
atom += _unicode(use_dep) |
50 |
return Atom(atom, unevaluated_atom=self, allow_repo=(self.repo is not None), _use=use_dep) |
51 |
@@ -1511,8 +1523,14 @@ class Atom(_unicode): |
52 |
if not self.use: |
53 |
return self |
54 |
atom = remove_slot(self) |
55 |
- if self.slot: |
56 |
- atom += ":%s" % self.slot |
57 |
+ if self.slot is not None or self.slot_abi_op is not None: |
58 |
+ atom += _slot_separator |
59 |
+ if self.slot is not None: |
60 |
+ atom += self.slot |
61 |
+ if self.slot_abi is not None: |
62 |
+ atom += "/%s" % self.slot_abi |
63 |
+ if self.slot_abi_op is not None: |
64 |
+ atom += self.slot_abi_op |
65 |
use_dep = self.use.violated_conditionals(other_use, is_valid_flag, parent_use) |
66 |
atom += _unicode(use_dep) |
67 |
return Atom(atom, unevaluated_atom=self, allow_repo=(self.repo is not None), _use=use_dep) |
68 |
@@ -1521,8 +1539,14 @@ class Atom(_unicode): |
69 |
if not (self.use and self.use.conditional): |
70 |
return self |
71 |
atom = remove_slot(self) |
72 |
- if self.slot: |
73 |
- atom += ":%s" % self.slot |
74 |
+ if self.slot is not None or self.slot_abi_op is not None: |
75 |
+ atom += _slot_separator |
76 |
+ if self.slot is not None: |
77 |
+ atom += self.slot |
78 |
+ if self.slot_abi is not None: |
79 |
+ atom += "/%s" % self.slot_abi |
80 |
+ if self.slot_abi_op is not None: |
81 |
+ atom += self.slot_abi_op |
82 |
use_dep = self.use._eval_qa_conditionals(use_mask, use_force) |
83 |
atom += _unicode(use_dep) |
84 |
return Atom(atom, unevaluated_atom=self, allow_repo=(self.repo is not None), _use=use_dep) |