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

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