From b903531feacbcb0ea2ba0d89e16895fa39221a278d137c55d0f7dcc85b404d58 Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Mon, 24 Feb 2014 12:07:04 +0000 Subject: [PATCH] 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 --- add-weak-dependencies.diff | 42 ++++++++++++++++---------------------- rpmlint.changes | 5 +++++ 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/add-weak-dependencies.diff b/add-weak-dependencies.diff index 66d895b..730efd5 100644 --- a/add-weak-dependencies.diff +++ b/add-weak-dependencies.diff @@ -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 diff --git a/rpmlint.changes b/rpmlint.changes index 84e40a8..3ef5896 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -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