diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-08-03 20:49:09 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-08-03 20:49:09 +0000 |
commit | f0d88cdd0befbefd94ba4a9769fac8e964a8d64f (patch) | |
tree | 74041d6ba39c4d1127d7fc209a72638fd9616af1 /pym/portage | |
parent | 38a4cf4b0821f0d880d8aeb6adf2c8c55af63e20 (diff) | |
download | portage-f0d88cdd0befbefd94ba4a9769fac8e964a8d64f.tar.gz portage-f0d88cdd0befbefd94ba4a9769fac8e964a8d64f.tar.bz2 portage-f0d88cdd0befbefd94ba4a9769fac8e964a8d64f.zip |
Bug #278729 - Add an Atom.without_use attribute which is identical to the
atom itself, except without any USE dependencies.
svn path=/main/trunk/; revision=13880
Diffstat (limited to 'pym/portage')
-rw-r--r-- | pym/portage/dep.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pym/portage/dep.py b/pym/portage/dep.py index 679a8558d..64215b68c 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -511,7 +511,7 @@ class Atom(object): _atoms = weakref.WeakValueDictionary() __slots__ = ("__weakref__", "blocker", "cp", "cpv", "operator", - "slot", "use", "_str") + "slot", "use", "without_use", "_str",) class _blocker(object): __slots__ = ("overlap",) @@ -550,9 +550,16 @@ class Atom(object): use = dep_getusedeps(s) if use: use = _use_dep(use) + without_use = remove_slot(self) + if self.slot is not None: + without_use += ":" + self.slot + without_use = Atom(without_use) else: use = None + without_use = self + obj_setattr(self, "use", use) + obj_setattr(self, "without_use", without_use) def __setattr__(self, name, value): raise AttributeError("Atom instances are immutable", |