aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-09-24 15:17:11 (GMT)
committerZac Medico <zmedico@gentoo.org>2012-09-24 15:17:11 (GMT)
commitc4703d79878e4e0eb8e2b36e49c0bdee835b847e (patch)
tree67e0989d3ece33d5a1eb02124bb01058a83ee917
parentdrop support for QA_DT_HASH/QA_STRICT_DT_HASH (diff)
downloadportage-c4703d79878e4e0eb8e2b36e49c0bdee835b847e.zip
portage-c4703d79878e4e0eb8e2b36e49c0bdee835b847e.tar.gz
portage-c4703d79878e4e0eb8e2b36e49c0bdee835b847e.tar.bz2
_global_updates: scan binarytree only if needed
This will fix bug #436084.
-rw-r--r--pym/portage/_global_updates.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/pym/portage/_global_updates.py b/pym/portage/_global_updates.py
index c0f3df0..9ae734b 100644
--- a/pym/portage/_global_updates.py
+++ b/pym/portage/_global_updates.py
@@ -46,12 +46,6 @@ def _do_global_updates(trees, prev_mtimes, quiet=False, if_mtime_changed=True):
portdb = trees[root]["porttree"].dbapi
vardb = trees[root]["vartree"].dbapi
bindb = trees[root]["bintree"].dbapi
- if not os.access(bindb.bintree.pkgdir, os.W_OK):
- bindb = None
- else:
- # Call binarytree.populate(), since we want to make sure it's
- # only populated with local packages here (getbinpkgs=0).
- bindb.bintree.populate()
world_file = os.path.join(mysettings['EROOT'], WORLD_FILE)
world_list = grabfile(world_file)
@@ -120,6 +114,14 @@ def _do_global_updates(trees, prev_mtimes, quiet=False, if_mtime_changed=True):
if myupd:
retupd = True
+ if retupd:
+ if os.access(bindb.bintree.pkgdir, os.W_OK):
+ # Call binarytree.populate(), since we want to make sure it's
+ # only populated with local packages here (getbinpkgs=0).
+ bindb.bintree.populate()
+ else:
+ bindb = None
+
master_repo = portdb.getRepositoryName(portdb.porttree_root)
if master_repo in repo_map:
repo_map['DEFAULT'] = repo_map[master_repo]