From 80189a556663fd2b1db534c2e5f7de6b261e1825 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 25 May 2008 21:45:41 +0000 Subject: [PATCH] Remove the Package.cpv_slot attribute. svn path=/main/trunk/; revision=10420 --- pym/_emerge/__init__.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 1d3fc5f76..0a024d502 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -1268,7 +1268,7 @@ class Package(Task): __slots__ = ("built", "cpv", "depth", "installed", "metadata", "onlydeps", "operation", "root", "type_name", - "category", "cp", "cpv_slot", "cpv_split", + "category", "cp", "cpv_split", "pf", "pv_split", "slot", "slot_atom", "use") metadata_keys = [ @@ -1284,11 +1284,6 @@ class Package(Task): self.slot_atom = portage.dep.Atom("%s:%s" % \ (self.cp, self.metadata["SLOT"])) - # This used to be "%s:%s" % (self.cpv, self.slot) but now - # is's just a reference to self since match_from_list() - # now supports Package references. - self.cpv_slot = self - self.category, self.pf = portage.catsplit(self.cpv) self.cpv_split = portage.catpkgsplit(self.cpv) self.pv_split = self.cpv_split[1:] @@ -3143,9 +3138,7 @@ class depgraph(object): e_pkg = self._slot_pkg_map[root].get(pkg.slot_atom) if not e_pkg: break - cpv_slot = "%s:%s" % \ - (e_pkg.cpv, e_pkg.metadata["SLOT"]) - if portage.dep.match_from_list(atom, [cpv_slot]): + if portage.dep.match_from_list(atom, [e_pkg]): if highest_version and \ e_pkg.cp == atom_cp and \ e_pkg < highest_version and \ -- 2.26.2