[PATCH] additional yum-utils scripts with invalid package size check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Similar to my patch posted on 05/31/07, this patch fixes repotrack and
yumdownloader so that they properly skip packages that have already been downloaded.

Perry Myers

-- 
|=- Red Hat, Engineering, Emerging Technologies, Boston.  +1 703 362 9622 -=|


diff -Naur --exclude=CVS yum-utils/repotrack.py yum-utils-mod/repotrack.py
--- yum-utils/repotrack.py	2007-06-05 11:41:11.000000000 -0400
+++ yum-utils-mod/repotrack.py	2007-06-05 12:01:47.000000000 -0400
@@ -220,7 +220,7 @@
         local = os.path.basename(remote)
         local = os.path.join(opts.destdir, local)
         if (os.path.exists(local) and 
-            str(os.path.getsize(local)) == pkg.returnSimple('packagesize')):
+            os.path.getsize(local) == int(pkg.returnSimple('packagesize'))):
             
             if not opts.quiet:
                 my.logger.info("%s already exists and appears to be complete" % local)
diff -Naur --exclude=CVS yum-utils/yumdownloader.py yum-utils-mod/yumdownloader.py
--- yum-utils/yumdownloader.py	2007-06-05 11:41:11.000000000 -0400
+++ yum-utils-mod/yumdownloader.py	2007-06-05 12:02:07.000000000 -0400
@@ -159,7 +159,7 @@
                     os.makedirs(opts.destdir)
                 local = os.path.join(opts.destdir, local)
                 if (os.path.exists(local) and 
-                    str(os.path.getsize(local)) == download.returnSimple('packagesize')):
+                    os.path.getsize(local) == int(download.returnSimple('packagesize'))):
                     self.logger.error("%s already exists and appears to be complete" % local)
                     continue
                 # Disable cache otherwise things won't download
@@ -188,4 +188,4 @@
         
 if __name__ == '__main__':
     util = YumDownloader()
-        
\ No newline at end of file
+        
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxxxxx
https://lists.dulug.duke.edu/mailman/listinfo/yum

[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux