File rpmlint-fix-unexpanded-macros-for-array-values.patch of Package rpmlint.4962

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(-)

Index: rpmlint-1.5/TagsCheck.py
===================================================================
--- rpmlint-1.5.orig/TagsCheck.py
+++ rpmlint-1.5/TagsCheck.py
@@ -524,13 +524,20 @@ class TagsCheck(AbstractCheck.AbstractCh
         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):
 
openSUSE Build Service is sponsored by