aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2006-11-26 14:14:01 (GMT)
committerZac Medico <zmedico@gentoo.org>2006-11-26 14:14:01 (GMT)
commitbb5bb2180186cd5cf138f4d17bb315e228d0a563 (patch)
tree957499104b4f70ceff2e0b6af4993371318499cc
parentFor bug #8423, make etc-update preserve timestamps when possible. (diff)
downloadportage-bb5bb2180186cd5cf138f4d17bb315e228d0a563.zip
portage-bb5bb2180186cd5cf138f4d17bb315e228d0a563.tar.gz
portage-bb5bb2180186cd5cf138f4d17bb315e228d0a563.tar.bz2
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 6a007ab..28c471e 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))