From eb90c10ce3a680ee927b79bdf5412ec8f606d51b Mon Sep 17 00:00:00 2001 From: Daniel Robbins Date: Mon, 12 Jan 2004 05:59:47 +0000 Subject: [PATCH] proper quoting for livecd-stage1.sh call git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@140 d1e1f19c-881f-0410-ab34-b69fee027534 --- modules/targets.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/targets.py b/modules/targets.py index f2020c90..d928f283 100644 --- a/modules/targets.py +++ b/modules/targets.py @@ -417,8 +417,13 @@ class livecd_stage1_target(generic_stage_target): generic_stage_target.__init__(self,spec,addlargs) def run_local(self): + mypack=self.settings["livecd/packages"][:] + for x in range(0,len(mypack)): + #surround args with quotes for passing to bash, allows things like "<" to remain intact + mypack[x]='"'+mypack[x]+'"' + mypack=string.join(mypack) try: - cmd("/bin/bash "+self.settings["sharedir"]+"/targets/livecd-stage1/livecd-stage1.sh run "+string.join(self.settings["livecd/packages"])) + cmd("/bin/bash "+self.settings["sharedir"]+"/targets/livecd-stage1/livecd-stage1.sh run "+mypack) except CatalystError: self.unbind() raise CatalystError,"GRP build aborting due to error." -- 2.26.2