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