* [gentoo-catalyst] [PATCH] stagebase: robustify portage_confdir setup
@ 2015-10-11 18:28 Mike Frysinger
2015-10-28 14:31 ` Brian Dolbec
0 siblings, 1 reply; 2+ messages in thread
From: Mike Frysinger @ 2015-10-11 18:28 UTC (permalink / raw
To: gentoo-catalyst; +Cc: kumba
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [gentoo-catalyst] [PATCH] stagebase: robustify portage_confdir setup
2015-10-11 18:28 [gentoo-catalyst] [PATCH] stagebase: robustify portage_confdir setup Mike Frysinger
@ 2015-10-28 14:31 ` Brian Dolbec
0 siblings, 0 replies; 2+ messages in thread
From: Brian Dolbec @ 2015-10-28 14:31 UTC (permalink / raw
To: gentoo-catalyst
On Sun, 11 Oct 2015 14:28:56 -0400
Mike Frysinger <vapier@gentoo.org> wrote:
> 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")
Yeah, this is definitely better
--
Brian Dolbec <dolsen>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-28 14:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-11 18:28 [gentoo-catalyst] [PATCH] stagebase: robustify portage_confdir setup Mike Frysinger
2015-10-28 14:31 ` Brian Dolbec
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox