SHA256
1
0
forked from pool/rpmlint

Accepting request 223398 from home:mlschroe:branches:devel:openSUSE:Factory:rpmlint

adapt to new rpm weak dependency tags

OBS-URL: https://build.opensuse.org/request/show/223398
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=245
This commit is contained in:
Ludwig Nussel 2014-02-24 12:07:04 +00:00 committed by Git OBS Bridge
parent b0b29cefb3
commit b903531fea
2 changed files with 23 additions and 24 deletions

View File

@ -1,7 +1,7 @@
Index: Pkg.py
===================================================================
--- Pkg.py.orig
+++ Pkg.py
--- Pkg.py.orig 2014-02-21 15:11:27.194647274 +0000
+++ Pkg.py 2014-02-21 15:13:26.205647064 +0000
@@ -427,6 +427,10 @@ class Pkg:
self._missingok_files = None
self._files = None
@ -45,21 +45,19 @@ Index: Pkg.py
names = header[nametag]
flags = header[flagstag]
versions = header[versiontag]
@@ -720,8 +740,12 @@ class Pkg:
@@ -720,7 +740,11 @@ class Pkg:
evr = stringToVersion(versions[loop].decode())
if prereq is not None and flags[loop] & PREREQ_FLAG:
prereq.append((name, flags[loop] & (~PREREQ_FLAG), evr))
- else:
- list.append((name, flags[loop], evr))
+ elif strong_only and flags[loop] & rpm.RPMSENSE_STRONG:
+ list.append((names[loop], versions[loop], flags[loop] & (~rpm.RPMSENSE_STRONG)))
+ elif weak_only and not (flags[loop] & rpm.RPMSENSE_STRONG):
+ list.append((names[loop], versions[loop], flags[loop]))
+ elif not (weak_only or strong_only):
+ list.append((name, flags[loop], evr))
list.append((name, flags[loop], evr))
def _gatherDepInfo(self):
if self._requires is None:
@@ -730,6 +754,10 @@ class Pkg:
self._provides = []
self._conflicts = []
@ -71,38 +69,34 @@ Index: Pkg.py
self._gather_aux(self.header, self._requires,
rpm.RPMTAG_REQUIRENAME,
@@ -748,6 +776,30 @@ class Pkg:
@@ -748,6 +776,26 @@ class Pkg:
rpm.RPMTAG_OBSOLETENAME,
rpm.RPMTAG_OBSOLETEFLAGS,
rpm.RPMTAG_OBSOLETEVERSION)
+ try:
+ self._gather_aux(self.header, self._recommends,
+ rpm.RPMTAG_SUGGESTSNAME,
+ rpm.RPMTAG_SUGGESTSFLAGS,
+ rpm.RPMTAG_SUGGESTSVERSION,
+ strong_only=True)
+ rpm.RPMTAG_RECOMMENDNAME,
+ rpm.RPMTAG_RECOMMENDFLAGS,
+ rpm.RPMTAG_RECOMMENDVERSION)
+ self._gather_aux(self.header, self._suggests,
+ rpm.RPMTAG_SUGGESTSNAME,
+ rpm.RPMTAG_SUGGESTSFLAGS,
+ rpm.RPMTAG_SUGGESTSVERSION,
+ weak_only=True)
+ rpm.RPMTAG_SUGGESTNAME,
+ rpm.RPMTAG_SUGGESTFLAGS,
+ rpm.RPMTAG_SUGGESTVERSION)
+ self._gather_aux(self.header, self._supplements,
+ rpm.RPMTAG_ENHANCESNAME,
+ rpm.RPMTAG_ENHANCESFLAGS,
+ rpm.RPMTAG_ENHANCESVERSION,
+ strong_only=True)
+ rpm.RPMTAG_SUPPLEMENTNAME,
+ rpm.RPMTAG_SUPPLEMENTFLAGS,
+ rpm.RPMTAG_SUPPLEMENTVERSION)
+ self._gather_aux(self.header, self._enhances,
+ rpm.RPMTAG_ENHANCESNAME,
+ rpm.RPMTAG_ENHANCESFLAGS,
+ rpm.RPMTAG_ENHANCESVERSION,
+ weak_only=True)
+ rpm.RPMTAG_ENHANCENAME,
+ rpm.RPMTAG_ENHANCEFLAGS,
+ rpm.RPMTAG_ENHANCEVERSION)
+ except:
+ pass
+
def scriptprog(self, which):
"""Get the specified script interpreter as a string.
@@ -761,6 +813,7 @@ class Pkg:
@@ -761,6 +809,7 @@ class Pkg:
prog = " ".join(prog)
return prog

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Feb 21 16:16:34 CET 2014 - mls@suse.de
- adapt to new rpm weak dependency tags
-------------------------------------------------------------------
Fri Feb 21 14:53:30 UTC 2014 - dmueller@suse.com