[PATCH] cli: Set the mtime from urlgrabber/pycurl, make users happy. BZ 872631.

James Antill james at and.org
Tue Oct 29 22:30:14 UTC 2013


---
 cli/koji |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/cli/koji b/cli/koji
index a870342..04d00bc 100755
--- a/cli/koji
+++ b/cli/koji
@@ -5726,6 +5726,15 @@ def anon_handle_download_build(options, session, args):
                 os.write(out, buf)
         finally:
             os.close(out)
+
+            # Set the mtime to the remote mtime, people like this. BZ 87263.
+            try:
+                import pycurl
+                mod_time = file.curl_obj.getinfo(pycurl.INFO_FILETIME)
+                os.utime(relpath, (mod_time, mod_time))
+            except:
+                pass # Ignore errors here.
+
             file.close()
 
 def anon_handle_wait_repo(options, session, args):
-- 
1.7.7.6



More information about the buildsys mailing list