When we already have the file or just downloaded it,
don't try other repositories providing the same pkg.
---
 yumdownloader.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/yumdownloader.py b/yumdownloader.py
index d37f15d..723b609 100755
--- a/yumdownloader.py
+++ b/yumdownloader.py
@@ -252,7 +252,7 @@ class YumDownloader(YumUtilBase):
                 if (os.path.exists(local) and 
                     os.path.getsize(local) == 
int(download.returnSimple('packagesize'))):
                     self.logger.error("%s already exists and appears to be 
complete" % local)
-                    continue
+                    break
                 # Disable cache otherwise things won't download
                 repo.cache = 0
                 download.localpath = local # Hack: to set the localpath we 
want.
@@ -274,6 +274,7 @@ class YumDownloader(YumUtilBase):
                                    size=os.stat(path).st_size)
                     shutil.copy2(path, local)
                     progress.end(progress.size)
+                break
         return exit_code
                     
     def _groupPackages(self,pkglist):
-- 
1.7.4.4

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to