[yum-commits] yum/config.py

James Antill james at osuosl.org
Thu Nov 21 15:51:27 UTC 2013


 yum/config.py |    7 +++++++
 1 file changed, 7 insertions(+)

New commits:
commit c15686ff9bbae92e9797006c9b7254bb4bfc3b39
Author: James Antill <james at and.org>
Date:   Thu Nov 21 10:50:56 2013 -0500

    Don't use the provide for distroverpkg if it's the name of the pkg. BZ 1002977.

diff --git a/yum/config.py b/yum/config.py
index b891f82..ea6c1ac 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -1218,6 +1218,13 @@ def _getsysver(installroot, distroverpkg):
         flag = hdr[getattr(rpm, 'RPMTAG_PROVIDEFLAGS')][off]
         flag = rpmUtils.miscutils.flagToString(flag)
         ver  = hdr[getattr(rpm, 'RPMTAG_PROVIDEVERSION')][off]
+
+        #  Note that if distroverpkg is the name of the package, then we can't
+        # use the provide because rpm automatically adds a provide for the name
+        # of the package. So just use the version, to be compatible.
+        if hdr['name'] == distroverpkg_prov:
+            flag = None
+            ver  = None
         if flag == 'EQ' and ver:
             # override the package version
             releasever = ver


More information about the Yum-commits mailing list