From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Cc: kumba@gentoo.org
Subject: [gentoo-catalyst] [PATCH] stagebase: robustify portage_confdir setup
Date: Sun, 11 Oct 2015 14:28:56 -0400 [thread overview]
Message-ID: <1444588136-22352-1-git-send-email-vapier@gentoo.org> (raw)
When setting up the portage_confdir, we should make sure it exists,
and that we rsync it properly (regardless of the settings given by
the user).
Bugzilla: https://bugs.gentoo.org/538652
Reported-by: Joshua Kinard <kumba@gentoo.org>
---
catalyst/base/stagebase.py | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py
index 4a0b482..740e05d 100644
--- a/catalyst/base/stagebase.py
+++ b/catalyst/base/stagebase.py
@@ -893,8 +893,12 @@ class StageBase(TargetBase, ClearBase, GenBase):
else:
if "portage_confdir" in self.settings:
log.info('Configuring %s...', self.settings['port_conf'])
- cmd("rsync -a " + self.settings["portage_confdir"] + "/ " +
- self.settings["chroot_path"] + self.settings["port_conf"],
+ dest = normpath(self.settings['chroot_path'] + '/' + self.settings['port_conf'])
+ ensure_dirs(dest)
+ # The trailing slashes on both paths are important:
+ # We want to make sure rsync copies the dirs into each
+ # other and not as subdirs.
+ cmd('rsync -a %s/ %s/' % (self.settings['portage_confdir'], dest),
"Error copying %s" % self.settings["port_conf"],
env=self.env)
self.resume.enable("setup_confdir")
--
2.5.2
next reply other threads:[~2015-10-11 18:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-11 18:28 Mike Frysinger [this message]
2015-10-28 14:31 ` [gentoo-catalyst] [PATCH] stagebase: robustify portage_confdir setup Brian Dolbec
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=1444588136-22352-1-git-send-email-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gentoo-catalyst@lists.gentoo.org \
--cc=kumba@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