SHA256
1
0
forked from pool/rpmlint

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
This commit is contained in:
Ludwig Nussel 2014-02-27 16:19:54 +00:00 committed by Git OBS Bridge
parent ffa6a30565
commit 15591fd243
3 changed files with 51 additions and 0 deletions

View File

@ -0,0 +1,42 @@
From 092a54ca23367c845f796f753fa8ff43746b844a Mon Sep 17 00:00:00 2001
From: Alberto Planas <aplanas@suse.com>
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

View File

@ -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

View File

@ -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