* [gentoo-commits] portage r15688 - in main/branches/2.1.7/pym/portage: . dbapi
@ 2010-03-02 21:08 Zac Medico (zmedico)
0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2010-03-02 21:08 UTC (permalink / raw
To: gentoo-commits
Author: zmedico
Date: 2010-03-02 21:08:03 +0000 (Tue, 02 Mar 2010)
New Revision: 15688
Modified:
main/branches/2.1.7/pym/portage/_global_updates.py
main/branches/2.1.7/pym/portage/dbapi/bintree.py
Log:
Make _global_updates ensure that the binarytree is only populated with local
packages (getbinpkgs=0), and fix binarytree.populate() to behave properly
when called more than once. (trunk r15487)
Modified: main/branches/2.1.7/pym/portage/_global_updates.py
===================================================================
--- main/branches/2.1.7/pym/portage/_global_updates.py 2010-03-02 21:07:53 UTC (rev 15687)
+++ main/branches/2.1.7/pym/portage/_global_updates.py 2010-03-02 21:08:03 UTC (rev 15688)
@@ -94,6 +94,10 @@
bindb = trees["/"]["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()
for update_cmd in myupd:
if update_cmd[0] == "move":
moves = vardb.move_ent(update_cmd)
Modified: main/branches/2.1.7/pym/portage/dbapi/bintree.py
===================================================================
--- main/branches/2.1.7/pym/portage/dbapi/bintree.py 2010-03-02 21:07:53 UTC (rev 15687)
+++ main/branches/2.1.7/pym/portage/dbapi/bintree.py 2010-03-02 21:08:03 UTC (rev 15688)
@@ -482,6 +482,13 @@
if (not os.path.isdir(self.pkgdir) and not getbinpkgs):
return 0
+ # Clear all caches in case populate is called multiple times
+ # as may be the case when _global_updates calls populate()
+ # prior to performing package moves since it only wants to
+ # operate on local packages (getbinpkgs=0).
+ self._remotepkgs = None
+ self.dbapi._clear_cache()
+ self.dbapi._aux_cache.clear()
if True:
pkg_paths = {}
self._pkg_paths = pkg_paths
@@ -693,10 +700,7 @@
writemsg(_("!!! PORTAGE_BINHOST unset, but use is requested.\n"),
noiselevel=-1)
- if getbinpkgs and \
- "PORTAGE_BINHOST" in self.settings and \
- not self._remotepkgs:
-
+ if getbinpkgs and 'PORTAGE_BINHOST' in self.settings:
base_url = self.settings["PORTAGE_BINHOST"]
from portage.const import CACHE_PATH
try:
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-02 21:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-02 21:08 [gentoo-commits] portage r15688 - in main/branches/2.1.7/pym/portage: . dbapi Zac Medico (zmedico)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox