summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-26 14:14:01 +0000
committerZac Medico <zmedico@gentoo.org>2006-11-26 14:14:01 +0000
commitbb5bb2180186cd5cf138f4d17bb315e228d0a563 (patch)
tree957499104b4f70ceff2e0b6af4993371318499cc /bin/dispatch-conf
parentFor bug #8423, make etc-update preserve timestamps when possible. (diff)
downloadportage-multirepo-bb5bb2180186cd5cf138f4d17bb315e228d0a563.tar.gz
portage-multirepo-bb5bb2180186cd5cf138f4d17bb315e228d0a563.tar.bz2
portage-multirepo-bb5bb2180186cd5cf138f4d17bb315e228d0a563.zip
For bug #8423, make dispatch-conf preserve timestamps when possible.
svn path=/main/trunk/; revision=5136
Diffstat (limited to 'bin/dispatch-conf')
-rwxr-xr-xbin/dispatch-conf3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/dispatch-conf b/bin/dispatch-conf
index 6a007ab5..28c471e9 100755
--- a/bin/dispatch-conf
+++ b/bin/dispatch-conf
@@ -279,8 +279,7 @@ class dispatch:
the diff of what changed into the configured log file."""
os.system((DIFF_CONTENTS % (curconf, newconf)) + '>>' + self.options["log-file"])
try:
- shutil.copyfile(newconf, curconf)
- os.remove(newconf)
+ os.rename(newconf, curconf)
except (IOError, os.error), why:
print >> sys.stderr, 'dispatch-conf: Error renaming %s to %s: %s; fatal' % \
(newconf, curconf, str(why))