commit: 232aae7f1fd79573426c0da9c1cbd79324994099 Author: Zac Medico <zmedico <AT> gentoo <DOT> org> AuthorDate: Tue Apr 10 01:32:04 2018 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Tue Apr 10 01:32:04 2018 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=232aae7f
binarytree._update_pkgindex_header: skip update if profile invalid (bug 640318) Return silently if the current profile is invalid or does not have an IUSE_IMPLICIT variable, since it's useful to maintain a cache of implicit IUSE settings for use with binary packages. Bug: https://bugs.gentoo.org/640318 pym/portage/dbapi/bintree.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py index 42d334d24..ab4f4760d 100644 --- a/pym/portage/dbapi/bintree.py +++ b/pym/portage/dbapi/bintree.py @@ -1293,6 +1293,20 @@ class binarytree(object): translated_keys=self._pkgindex_translated_keys) def _update_pkgindex_header(self, header): + """ + Add useful settings to the Packages file header, for use by + binhost clients. + + This will return silently if the current profile is invalid or + does not have an IUSE_IMPLICIT variable, since it's useful to + maintain a cache of implicit IUSE settings for use with binary + packages. + """ + if not (self.settings.profile_path and + "IUSE_IMPLICIT" in self.settings): + header.setdefault("VERSION", _unicode(self._pkgindex_version)) + return + portdir = normalize_path(os.path.realpath(self.settings["PORTDIR"])) profiles_base = os.path.join(portdir, "profiles") + os.path.sep if self.settings.profile_path:
