diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-04-27 15:49:05 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-04-27 15:49:05 -0700 |
commit | 436edc72f1f7a21e763f2ddb20fbb790be573f39 (patch) | |
tree | 88820c94d8528ff36b28283bf376e131797782cf | |
parent | 15a6152d2f7ca70565c3a2eacacad632b6f7b66b (diff) | |
download | portage-436edc72f1f7a21e763f2ddb20fbb790be573f39.tar.gz portage-436edc72f1f7a21e763f2ddb20fbb790be573f39.tar.bz2 portage-436edc72f1f7a21e763f2ddb20fbb790be573f39.zip |
In bintree.inject(), ensure that _pkgindex_entry returns local metadata
rather than remote metadata. Thanks to Kenneth Waters <kwaters@chromium.org>
for reporting.
-rw-r--r-- | pym/portage/dbapi/bintree.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index caa17699f..8a7112fde 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -943,6 +943,12 @@ class binarytree(object): if not self._pkgindex_version_supported(pkgindex): pkgindex = self._new_pkgindex() + # Discard remote metadata to ensure that _pkgindex_entry + # gets the local metadata. This also updates state for future + # isremote calls. + if self._remotepkgs is not None: + self._remotepkgs.pop(cpv, None) + try: d = self._pkgindex_entry(cpv) except portage.exception.InvalidDependString: @@ -981,11 +987,6 @@ class binarytree(object): if pkgindex_lock: unlockfile(pkgindex_lock) - if self._remotepkgs is not None: - # When a remote package is downloaded and injected, - # update state so self.isremote() returns False. - self._remotepkgs.pop(cpv, None) - def _pkgindex_entry(self, cpv): """ Performs checksums and evaluates USE flag conditionals. |