diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-09 08:45:05 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-09 08:45:05 +0000 |
commit | 3c3ac6a6a602818dfd055b051afdc67102bffc89 (patch) | |
tree | da3f46edf8ae9791c191371abc476d14971c21dc | |
parent | b45870791561cc40c86e1e2d86911c6c1ca1fe3a (diff) | |
download | portage-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__.py | 6 |
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) |