public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: "W. Trevor King" <wking@tremily.us>
To: gentoo-catalyst@lists.gentoo.org
Subject: [gentoo-catalyst] Re: [PATCH 2/5] generic_stage_target.py: Fix an intermittent snapshot_cache_path keyerror
Date: Tue, 4 Mar 2014 20:47:47 -0800	[thread overview]
Message-ID: <20140305044747.GD25297@odin.tremily.us> (raw)
In-Reply-To: <1393801262-13820-2-git-send-email-dolsen@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]

On Sun, Mar 02, 2014 at 03:00:59PM -0800, Brian Dolbec wrote:
>  	def set_snapcache_path(self):
> +		self.settings["snapshot_cache_path"] = \
> +			normpath(self.settings["snapshot_cache"] + "/" +
> +				self.settings["snapshot"])
>  		if "SNAPCACHE" in self.settings:
> -			self.settings["snapshot_cache_path"] = \
> -				normpath(self.settings["snapshot_cache"] + "/" +
> -					self.settings["snapshot"])

If we're getting snapshot_cache_path key errors, I think the solution
is to protect those call sites with:

  if 'SNAPCACHE' in self.settings:

blocks, not to define a snapcache-only setting for folks who are not
using snapcaches.  There are not particularly many snapshot_cache_path
references in catalyst.  Grepping through them, the following looks
suspicious:

catalyst/targets/generic_stage_target.py-215-           self.mountmap["portdir"] = normpath("/".join([
catalyst/targets/generic_stage_target.py:216:                   self.settings["snapshot_cache_path"],
catalyst/targets/generic_stage_target.py-217-                   self.settings["repo_name"],
catalyst/targets/generic_stage_target.py-218-                   ]))
catalyst/targets/generic_stage_target.py-219-           if "SNAPCACHE" not in self.settings:

Everything else looks fine.  So what should portdir be if SNAPCACHE
isn't set?

Cheers,
Trevor

-- 
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  parent reply	other threads:[~2014-03-05  4:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-02 23:00 [gentoo-catalyst] [PATCH 2/5] generic_stage_target.py: Fix an intermittent snapshot_cache_path keyerror Brian Dolbec
2014-03-02 23:01 ` [gentoo-catalyst] [PATCH 3/5] Add more working files, directories to .gitignore Brian Dolbec
2014-03-03  3:07   ` Brian Dolbec
2014-03-05  4:50   ` [gentoo-catalyst] " W. Trevor King
2014-03-05  5:17     ` Brian Dolbec
2014-03-05 15:32       ` W. Trevor King
2014-03-22 17:47         ` Brian Dolbec
2014-03-02 23:01 ` [gentoo-catalyst] [PATCH 4/5] catalyst/targets/generic_target.py: Pass TERM through to the chroot Brian Dolbec
2014-03-08 18:38   ` W. Trevor King
2014-03-02 23:01 ` [gentoo-catalyst] [PATCH 5/5] Add arm64 support Brian Dolbec
2014-03-03  3:05   ` Brian Dolbec
2014-03-05  4:47 ` W. Trevor King [this message]
2014-03-05  5:25   ` [gentoo-catalyst] Re: [PATCH 2/5] generic_stage_target.py: Fix an intermittent snapshot_cache_path keyerror Brian Dolbec
2014-03-08 18:25     ` [gentoo-catalyst] [PATCH] generic_stage_target: Don't set mountmap['portdir'] without SNAPCACHE W. Trevor King
2014-03-22 22:39       ` Brian Dolbec
2014-03-24  5:08         ` W. Trevor King

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=20140305044747.GD25297@odin.tremily.us \
    --to=wking@tremily.us \
    --cc=gentoo-catalyst@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