diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-02-20 21:48:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-02-20 21:48:34 +0000 |
commit | cb6e64ebb7827bea18abbc05a6dba839047fa651 (patch) | |
tree | f5b3e571cc1f672691b2c792eed1ceae2213c548 | |
parent | 6ac38cf72540a1766c5f2eb372cbf21e0c33a424 (diff) | |
download | portage-cb6e64ebb7827bea18abbc05a6dba839047fa651.tar.gz portage-cb6e64ebb7827bea18abbc05a6dba839047fa651.tar.bz2 portage-cb6e64ebb7827bea18abbc05a6dba839047fa651.zip |
For bug #167795, try avoid the population routine when possible, so that FEATURES=buildpkg doesn't always force population.
svn path=/main/trunk/; revision=6019
-rw-r--r-- | pym/portage/dbapi/bintree.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index a833f033c..4a0c70e18 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -285,6 +285,17 @@ class binarytree(object): use for a given cpv. If a collision will occur with an existing package from another category, the existing package will be bumped to ${PKGDIR}/${CATEGORY}/${PF}.tbz2 so that both can coexist.""" + if not self.populated: + # Try to avoid the population routine when possible, so that + # FEATURES=buildpkg doesn't always force population. + mycat, mypkg = catsplit(cpv) + myfile = mypkg + ".tbz2" + full_path = os.path.join(self.pkgdir, "All", myfile) + if not os.path.exists(full_path): + return + tbz2_cat = portage.xpak.tbz2(full_path).getfile("CATEGORY") + if tbz2_cat and tbz2_cat.strip() == mycat: + return full_path = self.getname(cpv) if "All" == full_path.split(os.path.sep)[-2]: return |