summaryrefslogtreecommitdiffstats
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
parent1e97aecdc2b27ff3a78ee4061eaa712b6d667980 (diff)
downloadportage-bb5bb2180186cd5cf138f4d17bb315e228d0a563.tar.gz
portage-bb5bb2180186cd5cf138f4d17bb315e228d0a563.tar.bz2
portage-bb5bb2180186cd5cf138f4d17bb315e228d0a563.zip
For bug #8423, make dispatch-conf preserve timestamps when possible.
svn path=/main/trunk/; revision=5136
-rwxr-xr-xbin/dispatch-conf3
1 files changed, 1 insertions, 2 deletions
diff --git a/bin/dispatch-conf b/bin/dispatch-conf
index 6a007ab53..28c471e94 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))