summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-09-24 22:15:16 +0000
committerZac Medico <zmedico@gentoo.org>2007-09-24 22:15:16 +0000
commitfbb24f41bbdf93a741196fa8a66ecc94ae6fb4d7 (patch)
tree3a20136db7a08f3442c24a84df25e150addd53e4 /pym/portage/dispatch_conf.py
parentInitialize ${TMP} before registering the die trap so that (diff)
downloadportage-multirepo-fbb24f41bbdf93a741196fa8a66ecc94ae6fb4d7.tar.gz
portage-multirepo-fbb24f41bbdf93a741196fa8a66ecc94ae6fb4d7.tar.bz2
portage-multirepo-fbb24f41bbdf93a741196fa8a66ecc94ae6fb4d7.zip
Bug #74615 - Quote all file paths inside dispatch-conf shell commands.
svn path=/main/trunk/; revision=7803
Diffstat (limited to 'pym/portage/dispatch_conf.py')
-rw-r--r--pym/portage/dispatch_conf.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/portage/dispatch_conf.py b/pym/portage/dispatch_conf.py
index 690772bf..860ffea3 100644
--- a/pym/portage/dispatch_conf.py
+++ b/pym/portage/dispatch_conf.py
@@ -16,9 +16,9 @@ RCS_BRANCH = '1.1.1'
RCS_LOCK = 'rcs -ko -M -l'
RCS_PUT = 'ci -t-"Archived config file." -m"dispatch-conf update."'
RCS_GET = 'co'
-RCS_MERGE = 'rcsmerge -p -r' + RCS_BRANCH + ' %s >%s'
+RCS_MERGE = "rcsmerge -p -r" + RCS_BRANCH + " '%s' > '%s'"
-DIFF3_MERGE = 'diff3 -mE %s %s %s >%s'
+DIFF3_MERGE = "diff3 -mE '%s' '%s' '%s' > '%s'"
def read_config(mandatory_opts):
try:
@@ -33,7 +33,7 @@ def read_config(mandatory_opts):
for key in mandatory_opts:
if not opts.has_key(key):
if key == "merge":
- opts["merge"] = "sdiff --suppress-common-lines --output=%s %s %s"
+ opts["merge"] = "sdiff --suppress-common-lines --output='%s' '%s' '%s'"
else:
print >> sys.stderr, 'dispatch-conf: Missing option "%s" in /etc/dispatch-conf.conf; fatal' % (key,)
@@ -106,7 +106,7 @@ def file_archive(archive, curconf, newconf, mrgconf):
# Archive the current config file if it isn't already saved
if os.path.exists(archive) \
- and len(commands.getoutput('diff -aq %s %s' % (curconf,archive))) != 0:
+ and len(commands.getoutput("diff -aq '%s' '%s'" % (curconf,archive))) != 0:
suf = 1
while suf < 9 and os.path.exists(archive + '.' + str(suf)):
suf += 1