Allow caching local repos. BZ 1125387 master
authorValentina Mukhamedzhanova <vmukhame@redhat.com>
Tue, 14 Oct 2014 18:41:30 +0000 (20:41 +0200)
committerValentina Mukhamedzhanova <vmukhame@redhat.com>
Tue, 14 Oct 2014 18:41:30 +0000 (20:41 +0200)
yum/__init__.py

index 83a546a..6d2c078 100644 (file)
@@ -603,6 +603,9 @@ class YumBase(depsolve.Depsolve):
         repo.cfg = parser
         # Enable parallel downloading
         repo._async = repo.async
+        # Allow caching local repos
+        if repo.keepcache and any(u.startswith('file:') for u in repo.baseurl):
+            repo.copy_local = True
         return repo
 
     def disablePlugins(self):