summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-20 21:49:14 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-20 21:49:14 +0000
commitf9821525540f6ce0e47d2cfcc0454a1ff9c6dba5 (patch)
tree2ab9b068e0c84c7d813e39734339e1b6423a1583 /pym
parent684fe497d9b2dd09ae3ec9290b5c503255838b41 (diff)
downloadportage-f9821525540f6ce0e47d2cfcc0454a1ff9c6dba5.tar.gz
portage-f9821525540f6ce0e47d2cfcc0454a1ff9c6dba5.tar.bz2
portage-f9821525540f6ce0e47d2cfcc0454a1ff9c6dba5.zip
For bug #167795, try avoid the population routine when possible, so that FEATURES=buildpkg doesn't always force population. (trunk r6018:6019)
svn path=/main/branches/2.1.2/; revision=6020
Diffstat (limited to 'pym')
-rw-r--r--pym/portage.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pym/portage.py b/pym/portage.py
index fadc9cec5..90d18ca38 100644
--- a/pym/portage.py
+++ b/pym/portage.py
@@ -6434,6 +6434,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 = 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