Blame SOURCES/BZ-1293707-debuginfo-installonly-latest-version.patch

fe6837
commit 2f1605f65e6bc24d6a2515b99f1486085f281a49
fe6837
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
fe6837
Date:   Tue Mar 1 16:18:39 2016 +0100
fe6837
fe6837
    debuginfo-install: install debuginfo only for the latest installed version of installonly package. BZ#1293707
fe6837
fe6837
diff --git a/debuginfo-install.py b/debuginfo-install.py
fe6837
index bb61a1d..19fe8b6 100755
fe6837
--- a/debuginfo-install.py
fe6837
+++ b/debuginfo-install.py
fe6837
@@ -148,9 +148,12 @@ class DebugInfoInstall(YumUtilBase):
fe6837
         # add that debuginfo to the ts
fe6837
         # look through that pkgs' deps
fe6837
         # add all the debuginfos for the pkgs providing those deps
fe6837
+        installonly_added = set()
fe6837
         for pkgglob in self.cmds:
fe6837
             e, m, u = self.rpmdb.matchPackageNames([pkgglob])
fe6837
-            for po in e + m:
fe6837
+            for po in sorted(e + m, reverse=True):
fe6837
+                if po.name in installonly_added:
fe6837
+                    continue
fe6837
                 try:
fe6837
                     self.di_try_install(po)
fe6837
                 except yum.Errors.InstallError, e:
fe6837
@@ -167,6 +170,8 @@ class DebugInfoInstall(YumUtilBase):
fe6837
                                 self.di_try_install(deppo)
fe6837
                             except yum.Errors.InstallError, e:
fe6837
                                 self.logger.critical('Could not find debuginfo pkg for dependency package %s' % deppo)
fe6837
+                if po.name in self.conf.installonlypkgs:
fe6837
+                    installonly_added.add(po.name)
fe6837
 
fe6837
         for pkgname in u:
fe6837
             self.logger.critical('Could not find a package for: %s' % pkgname)
fe6837
commit 8048d25bf3225b8ddd7d0a90b050bce2cc716e2a
fe6837
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
fe6837
Date:   Tue Jun 21 14:24:12 2016 +0200
fe6837
fe6837
    debuginfo-install: also respect provides when testing for installonly.
fe6837
fe6837
diff --git a/debuginfo-install.py b/debuginfo-install.py
fe6837
index 19fe8b6..6053f62 100755
fe6837
--- a/debuginfo-install.py
fe6837
+++ b/debuginfo-install.py
fe6837
@@ -170,7 +170,7 @@ class DebugInfoInstall(YumUtilBase):
fe6837
                                 self.di_try_install(deppo)
fe6837
                             except yum.Errors.InstallError, e:
fe6837
                                 self.logger.critical('Could not find debuginfo pkg for dependency package %s' % deppo)
fe6837
-                if po.name in self.conf.installonlypkgs:
fe6837
+                if self.allowedMultipleInstalls(po):
fe6837
                     installonly_added.add(po.name)
fe6837
 
fe6837
         for pkgname in u: