[PATCH] Disable drpms for local repositories. BZ 1007097

Zdenek Pavlas zpavlas at redhat.com
Thu Sep 12 08:25:58 UTC 2013


---
 yum/drpm.py    | 2 ++
 yum/yumRepo.py | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/yum/drpm.py b/yum/drpm.py
index 2e23241..4cd953b 100644
--- a/yum/drpm.py
+++ b/yum/drpm.py
@@ -128,6 +128,8 @@ class DeltaInfo:
         pinfo = {}
         reposize = {}
         for index, po in enumerate(pkgs):
+            if po.repo.local:
+                continue # Already have .rpms
             if po.repo.deltarpm_percentage == 1:
                 continue # Allow people to turn off a repo. (meh)
             if po.state == TS_UPDATE: pass
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index b98d3cf..b2b4580 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -380,6 +380,7 @@ class YumRepository(Repository, config.RepoConf):
         self._grabfunc = None
         self._grab = None
         self._async = False
+        self.local = True
 
     def __cmp__(self, other):
         """ Sort yum repos. by cost, and then by alphanumeric on their id. """
@@ -852,6 +853,8 @@ class YumRepository(Repository, config.RepoConf):
                 skipped = url
                 continue
             else:
+                if s != 'file':
+                    self.local = False
                 goodurls.append(url)
 
         if skipped is not None:
-- 
1.7.11.7



More information about the Yum-devel mailing list