summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-05-09 08:45:05 +0000
committerZac Medico <zmedico@gentoo.org>2008-05-09 08:45:05 +0000
commit3c3ac6a6a602818dfd055b051afdc67102bffc89 (patch)
treeda3f46edf8ae9791c191371abc476d14971c21dc
parentb45870791561cc40c86e1e2d86911c6c1ca1fe3a (diff)
downloadportage-3c3ac6a6a602818dfd055b051afdc67102bffc89.tar.gz
portage-3c3ac6a6a602818dfd055b051afdc67102bffc89.tar.bz2
portage-3c3ac6a6a602818dfd055b051afdc67102bffc89.zip
Simplify code for derived Package attributes.
svn path=/main/trunk/; revision=10266
-rw-r--r--pym/_emerge/__init__.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index bd013fa61..43af8058b 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -1285,10 +1285,8 @@ class Package(Task):
self.cp = portage.cpv_getkey(self.cpv)
self.slot_atom = "%s:%s" % (self.cp, self.metadata["SLOT"])
self.cpv_slot = "%s:%s" % (self.cpv, self.metadata["SLOT"])
- cpv_parts = portage.catpkgsplit(self.cpv)
- self.category = cpv_parts[0]
- self.pv_split = cpv_parts[1:]
- self.pf = self.cpv.replace(self.category + "/", "", 1)
+ self.category, self.pf = portage.catsplit(self.cpv)
+ self.pv_split = portage.catpkgsplit(self.cpv)[1:]
def _get_hash_key(self):
hash_key = getattr(self, "_hash_key", None)