You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.5 KiB

commit 3a0bad67e16c391b57cf26bc68c8c61f96b5b077
Author: Zdenek Pavlas <zpavlas@redhat.com>
Date: Wed Nov 20 13:32:13 2013 +0100
_getsysver(): use the version of the provide.
Use it as-is (no stripping or rewriting)
diff --git a/yum/config.py b/yum/config.py
index ecb8490..8f8e654 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -1210,11 +1210,8 @@ def _getsysver(installroot, distroverpkg):
flag = rpmUtils.miscutils.flagToString(flag)
ver = hdr[getattr(rpm, 'RPMTAG_PROVIDEVERSION')][off]
if flag == 'EQ' and ver:
- releasever = rpmUtils.miscutils.stringToVersion(releasever)
- if releasever[2]:
- releasever = "%s-%s" % (releasever[1], releasever[2]) # No epoch
- else:
- releasever = releasever[1] # No epoch or release, just version
+ # override the package version
+ releasever = ver
del hdr
del idx
diff --git a/yum/config.py b/yum/config.py
index cdad4bc..cb5243f 100644
--- a/yum/config.py
+++ b/yum/config.py
@@ -1213,8 +1213,9 @@ def _getsysver(installroot, distroverpkg):
flag = rpmUtils.miscutils.flagToString(flag)
ver = hdr[getattr(rpm, 'RPMTAG_PROVIDEVERSION')][off]
if flag == 'EQ' and ver:
- # override the package version
- releasever = ver
+ if hdr['name'] != distroverpkg_prov:
+ # override the package version
+ releasever = ver
del hdr
del idx