From: Brian Dolbec <dolsen@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] repoman: fix KeyError triggered by fetch failure during manifest generation (bug 569942)
Date: Tue, 29 Dec 2015 12:18:18 -0800 [thread overview]
Message-ID: <20151229121818.36fbdb84.dolsen@gentoo.org> (raw)
In-Reply-To: <1451268786-17054-1-git-send-email-zmedico@gentoo.org>
On Sun, 27 Dec 2015 18:13:06 -0800
Zac Medico <zmedico@gentoo.org> wrote:
> Fix Scanner not to override portdbapi._aux_cache_keys when generating
> manifests, since spawn_nofetch requires additional keys.
>
> Fixes: 39d81c514c33 ("[...]config.__getitem__(): Partially drop
> backward compatibility for nonexistent keys.") X-Gentoo-Bug: 569942
> X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=569942
> ---
> pym/repoman/scanner.py | 10 +++++++---
> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> diff --git a/pym/repoman/scanner.py b/pym/repoman/scanner.py
> index 9a87f65..d1c10d7 100644
> --- a/pym/repoman/scanner.py
> +++ b/pym/repoman/scanner.py
> @@ -93,9 +93,13 @@ class Scanner(object):
> self.portdb.settings =
> self.repo_settings.repoman_settings # We really only need to cache
> the metadata that's necessary for visibility # filtering. Anything
> else can be discarded to reduce memory consumption.
> - self.portdb._aux_cache_keys.clear()
> - self.portdb._aux_cache_keys.update(
> - ["EAPI", "IUSE", "KEYWORDS", "repository",
> "SLOT"])
> + if self.options.mode != "manifest" and
> self.options.digest != "y":
> + # Don't do this when generating manifests,
> since that uses
> + # additional keys if spawn_nofetch is called
> (RESTRICT and
> + # DEFINED_PHASES).
> + self.portdb._aux_cache_keys.clear()
> + self.portdb._aux_cache_keys.update(
> + ["EAPI", "IUSE", "KEYWORDS",
> "repository", "SLOT"])
> self.reposplit = myreporoot.split(os.path.sep)
> self.repolevel = len(self.reposplit)
Tested and confirmed working correctly now :)
Thanks. looks good
--
Brian Dolbec <dolsen>
prev parent reply other threads:[~2015-12-29 20:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-28 2:13 [gentoo-portage-dev] [PATCH] repoman: fix KeyError triggered by fetch failure during manifest generation (bug 569942) Zac Medico
2015-12-29 20:18 ` Brian Dolbec [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151229121818.36fbdb84.dolsen@gentoo.org \
--to=dolsen@gentoo.org \
--cc=gentoo-portage-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox