diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-09-26 04:41:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-09-26 04:41:34 +0000 |
commit | 8e2d9cd5ab9aabbfe1e65f635e7a10c473240d69 (patch) | |
tree | 895887103d4b4baf425ea3903ca02f306f3387d1 /pym | |
parent | b5f728a786d2fcb7f9960a96cfdf5fc26bcbb509 (diff) | |
download | portage-8e2d9cd5ab9aabbfe1e65f635e7a10c473240d69.tar.gz portage-8e2d9cd5ab9aabbfe1e65f635e7a10c473240d69.tar.bz2 portage-8e2d9cd5ab9aabbfe1e65f635e7a10c473240d69.zip |
Bug #74615 - Quote all file paths inside dispatch-conf shell
commands. (trunk r7803)
svn path=/main/branches/2.1.2/; revision=7831
Diffstat (limited to 'pym')
-rw-r--r-- | pym/dispatch_conf.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pym/dispatch_conf.py b/pym/dispatch_conf.py index 690772bf8..860ffea30 100644 --- a/pym/dispatch_conf.py +++ b/pym/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 |