From: Zac Medico Date: Sun, 19 Sep 2010 21:50:51 +0000 (-0700) Subject: Make repoman tolerate errors from utime() when fetching metadata.dtd. X-Git-Tag: v2.2_rc85~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=772f84d14ebc3105ce91c8272106450e1d4eadf0;p=portage.git Make repoman tolerate errors from utime() when fetching metadata.dtd. --- 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: