* [gentoo-commits] portage r13880 - in main/trunk/pym: _emerge portage
@ 2009-08-03 20:49 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2009-08-03 20:49 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2009-08-03 20:49:09 +0000 (Mon, 03 Aug 2009)
New Revision: 13880
Modified:
main/trunk/pym/_emerge/depgraph.py
main/trunk/pym/portage/dep.py
Log:
Bug #278729 - Add an Atom.without_use attribute which is identical to the
atom itself, except without any USE dependencies.
Modified: main/trunk/pym/_emerge/depgraph.py
===================================================================
--- main/trunk/pym/_emerge/depgraph.py 2009-08-03 20:13:17 UTC (rev 13879)
+++ main/trunk/pym/_emerge/depgraph.py 2009-08-03 20:49:09 UTC (rev 13880)
@@ -712,14 +712,8 @@
else:
# Do not backtrack if only USE have to be changed in
# order to satisfy the dependency.
- atom_without_use = dep.atom
- if dep.atom.use:
- atom_without_use = portage.dep.remove_slot(dep.atom)
- if dep.atom.slot:
- atom_without_use += ":" + dep.atom.slot
- atom_without_use = portage.dep.Atom(atom_without_use)
dep_pkg, existing_node = \
- self._select_package(dep.root, atom_without_use,
+ self._select_package(dep.root, atom.without_use,
onlydeps=dep.onlydeps)
if dep_pkg is None:
self._dynamic_config._runtime_pkg_mask.setdefault(
@@ -1845,12 +1839,6 @@
def _show_unsatisfied_dep(self, root, atom, myparent=None, arg=None):
atom = portage.dep.Atom(atom)
atom_set = InternalPackageSet(initial_atoms=(atom,))
- atom_without_use = atom
- if atom.use:
- atom_without_use = portage.dep.remove_slot(atom)
- if atom.slot:
- atom_without_use += ":" + atom.slot
- atom_without_use = portage.dep.Atom(atom_without_use)
xinfo = '"%s"' % atom
if arg:
xinfo='"%s"' % arg
@@ -1871,9 +1859,9 @@
continue
match = db.match
if hasattr(db, "xmatch"):
- cpv_list = db.xmatch("match-all", atom_without_use)
+ cpv_list = db.xmatch("match-all", atom.without_use)
else:
- cpv_list = db.match(atom_without_use)
+ cpv_list = db.match(atom.without_use)
# descending order
cpv_list.reverse()
for cpv in cpv_list:
Modified: main/trunk/pym/portage/dep.py
===================================================================
--- main/trunk/pym/portage/dep.py 2009-08-03 20:13:17 UTC (rev 13879)
+++ main/trunk/pym/portage/dep.py 2009-08-03 20:49:09 UTC (rev 13880)
@@ -511,7 +511,7 @@
_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 @@
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",
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-08-03 20:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-03 20:49 [gentoo-commits] portage r13880 - in main/trunk/pym: _emerge portage Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox