From 15591fd24358e402b65df367324554a20d9338eba9dc1b6cd583e377a8041f2d Mon Sep 17 00:00:00 2001 From: Ludwig Nussel Date: Thu, 27 Feb 2014 16:19:54 +0000 Subject: [PATCH] Accepting request 224128 from home:aplanas:branches:devel:openSUSE:Factory:rpmlint - added patches: * rpmlint-fix-unexpanded-macros-for-array-values.patch - fix _unexpanded_macros for array values OBS-URL: https://build.opensuse.org/request/show/224128 OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=249 --- ...x-unexpanded-macros-for-array-values.patch | 42 +++++++++++++++++++ rpmlint.changes | 7 ++++ rpmlint.spec | 2 + 3 files changed, 51 insertions(+) create mode 100644 rpmlint-fix-unexpanded-macros-for-array-values.patch diff --git a/rpmlint-fix-unexpanded-macros-for-array-values.patch b/rpmlint-fix-unexpanded-macros-for-array-values.patch new file mode 100644 index 0000000..67a69e0 --- /dev/null +++ b/rpmlint-fix-unexpanded-macros-for-array-values.patch @@ -0,0 +1,42 @@ +From 092a54ca23367c845f796f753fa8ff43746b844a Mon Sep 17 00:00:00 2001 +From: Alberto Planas +Date: Thu, 27 Feb 2014 16:35:13 +0100 +Subject: [PATCH] Fix _unexpanded_macros for array values + +--- + TagsCheck.py | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/TagsCheck.py b/TagsCheck.py +index c6f5dda..712d4e0 100644 +--- a/TagsCheck.py ++++ b/TagsCheck.py +@@ -533,13 +533,20 @@ class TagsCheck(AbstractCheck.AbstractCheck): + AbstractCheck.AbstractCheck.__init__(self, 'TagsCheck') + + def _unexpanded_macros(self, pkg, tagname, value, is_url=False): ++ def _check_value(value): ++ for match in AbstractCheck.macro_regex.findall(value): ++ # Do not warn about %XX URL escapes ++ if is_url and re.match('^%[0-9A-F][0-9A-F]$', match, re.I): ++ continue ++ printWarning(pkg, 'unexpanded-macro', tagname, match) ++ + if not value: + return +- for match in AbstractCheck.macro_regex.findall(value): +- # Do not warn about %XX URL escapes +- if is_url and re.match('^%[0-9A-F][0-9A-F]$', match, re.I): +- continue +- printWarning(pkg, 'unexpanded-macro', tagname, match) ++ if isinstance(value, list): ++ for single_value in value: ++ _check_value(single_value) ++ else: ++ _check_value(value) + + def check(self, pkg): + +-- +1.9.0 + diff --git a/rpmlint.changes b/rpmlint.changes index 02c539a..f9a721e 100644 --- a/rpmlint.changes +++ b/rpmlint.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Feb 27 15:45:18 UTC 2014 - aplanas@suse.com + +- added patches: + * rpmlint-fix-unexpanded-macros-for-array-values.patch +- fix _unexpanded_macros for array values + ------------------------------------------------------------------- Thu Feb 27 11:07:25 UTC 2014 - lnussel@suse.de diff --git a/rpmlint.spec b/rpmlint.spec index 80cf774..4ba4d4c 100644 --- a/rpmlint.spec +++ b/rpmlint.spec @@ -127,6 +127,7 @@ Patch93: xdg-check-exception.diff Patch94: suse-ignore-specfile-errors.diff Patch95: invalid-filerequires.diff Patch96: rpmlint-decode-fix.diff +Patch97: rpmlint-fix-unexpanded-macros-for-array-values.patch %py_requires @@ -206,6 +207,7 @@ source packages can be checked. %patch94 %patch95 %patch96 -p1 +%patch97 -p1 cp -p %{SOURCE2} . # Only move top-level python files chmod 0755 rpmlint-checks-master/*.py