From: Zac Medico Date: Mon, 2 Jul 2012 20:27:57 +0000 (-0700) Subject: Atom: evaluate_conditionals slot-abi, bug #424489 X-Git-Tag: v2.2.0_alpha115~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=47029cd18764795a4c2cff1f985c56c87ca07ed9;p=portage.git Atom: evaluate_conditionals slot-abi, bug #424489 --- diff --git a/pym/portage/dep/__init__.py b/pym/portage/dep/__init__.py index 557c92b42..c722e4802 100644 --- a/pym/portage/dep/__init__.py +++ b/pym/portage/dep/__init__.py @@ -1428,8 +1428,14 @@ class Atom(_unicode): def with_repo(self, repo): atom = remove_slot(self) + if self.slot is not None or self.slot_abi_op is not None: + atom += _slot_separator if self.slot is not None: - atom += _slot_separator + self.slot + atom += self.slot + if self.slot_abi is not None: + atom += "/%s" % self.slot_abi + if self.slot_abi_op is not None: + atom += self.slot_abi_op atom += _repo_separator + repo if self.use is not None: atom += _unicode(self.use) @@ -1489,8 +1495,14 @@ class Atom(_unicode): if not (self.use and self.use.conditional): return self atom = remove_slot(self) - if self.slot: - atom += ":%s" % self.slot + if self.slot is not None or self.slot_abi_op is not None: + atom += _slot_separator + if self.slot is not None: + atom += self.slot + if self.slot_abi is not None: + atom += "/%s" % self.slot_abi + if self.slot_abi_op is not None: + atom += self.slot_abi_op use_dep = self.use.evaluate_conditionals(use) atom += _unicode(use_dep) return Atom(atom, unevaluated_atom=self, allow_repo=(self.repo is not None), _use=use_dep) @@ -1511,8 +1523,14 @@ class Atom(_unicode): if not self.use: return self atom = remove_slot(self) - if self.slot: - atom += ":%s" % self.slot + if self.slot is not None or self.slot_abi_op is not None: + atom += _slot_separator + if self.slot is not None: + atom += self.slot + if self.slot_abi is not None: + atom += "/%s" % self.slot_abi + if self.slot_abi_op is not None: + atom += self.slot_abi_op use_dep = self.use.violated_conditionals(other_use, is_valid_flag, parent_use) atom += _unicode(use_dep) return Atom(atom, unevaluated_atom=self, allow_repo=(self.repo is not None), _use=use_dep) @@ -1521,8 +1539,14 @@ class Atom(_unicode): if not (self.use and self.use.conditional): return self atom = remove_slot(self) - if self.slot: - atom += ":%s" % self.slot + if self.slot is not None or self.slot_abi_op is not None: + atom += _slot_separator + if self.slot is not None: + atom += self.slot + if self.slot_abi is not None: + atom += "/%s" % self.slot_abi + if self.slot_abi_op is not None: + atom += self.slot_abi_op use_dep = self.use._eval_qa_conditionals(use_mask, use_force) atom += _unicode(use_dep) return Atom(atom, unevaluated_atom=self, allow_repo=(self.repo is not None), _use=use_dep)