summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-09-19 14:50:51 -0700
committerZac Medico <zmedico@gentoo.org>2010-09-19 14:50:51 -0700
commit772f84d14ebc3105ce91c8272106450e1d4eadf0 (patch)
tree6cc7c7077b1940b4eadb1306a156b6e0ae8cef07
parentd868dd62a1c51e9829a8fe4eb2342d4c5226182d (diff)
downloadportage-772f84d14ebc3105ce91c8272106450e1d4eadf0.tar.gz
portage-772f84d14ebc3105ce91c8272106450e1d4eadf0.tar.bz2
portage-772f84d14ebc3105ce91c8272106450e1d4eadf0.zip
Make repoman tolerate errors from utime() when fetching metadata.dtd.
-rwxr-xr-xbin/repoman11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/repoman b/bin/repoman
index 9cbd58bc9..f2f16f25c 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -907,8 +907,15 @@ def fetch_metadata_dtd():
local_f.write(url_f.read())
local_f.close()
if last_modified is not None:
- os.utime(metadata_dtd_tmp,
- (int(last_modified), int(last_modified)))
+ try:
+ os.utime(metadata_dtd_tmp,
+ (int(last_modified), int(last_modified)))
+ except OSError:
+ # This fails on some odd non-unix-like filesystems.
+ # We don't really need the mtime to be preserved
+ # anyway here (currently we use ctime to trigger
+ # fetch), so just ignore it.
+ pass
os.rename(metadata_dtd_tmp, metadata_dtd)
finally:
try: