[packages/rpm] - fix spec parsing wrt unknown macros (don't treat them as empty tags)

baggins baggins at pld-linux.org
Mon Feb 25 14:37:07 CET 2013


commit 94807250802131fe44a54a355f2bc0a9c5f9c809
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Feb 25 14:36:38 2013 +0100

    - fix spec parsing wrt unknown macros (don't treat them as empty tags)

 rpm-parseSpec-skip-empty-tags.patch | 11 +++++++++++
 rpm.spec                            |  2 ++
 2 files changed, 13 insertions(+)
---
diff --git a/rpm.spec b/rpm.spec
index ec2f8b6..00b591a 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -155,6 +155,7 @@ Patch61:	%{name}-clean-docdir.patch
 Patch62:	%{name}-DB_CONFIG.patch
 Patch63:	%{name}-pythoneggs.patch
 Patch64:	%{name}-fix-compress-doc.patch
+Patch65:	%{name}-parseSpec-skip-empty-tags.patch
 
 # Patches imported from Mandriva
 
@@ -860,6 +861,7 @@ Dokumentacja API RPM-a oraz przewodniki w formacie HTML generowane ze
 %patch62 -p1
 %patch63 -p1
 %patch64 -p1
+%patch65 -p1
 
 %patch1000 -p1
 %patch1001 -p1
diff --git a/rpm-parseSpec-skip-empty-tags.patch b/rpm-parseSpec-skip-empty-tags.patch
new file mode 100644
index 0000000..119cbed
--- /dev/null
+++ b/rpm-parseSpec-skip-empty-tags.patch
@@ -0,0 +1,11 @@
+--- rpm-5.4.10/build/parseSpec.c.orig	2013-02-25 14:29:07.874848468 +0100
++++ rpm-5.4.10/build/parseSpec.c	2013-02-25 14:29:25.661698897 +0100
+@@ -92,6 +92,8 @@
+         if (aTags != NULL && aTags[0] != NULL) {
+             ARGV_t av;
+             s = tagCanonicalize(line+1);	/* XXX +1 to skip leading '%' */
++	    if (strlen(s) == 0)	/* not a tag, just unknown macro */
++		    goto exit;
+ #if defined(RPM_VENDOR_OPENPKG) /* wildcard-matching-arbitrary-tagnames */
+             av = argvSearchLinear(aTags, s, argvFnmatchCasefold);
+ #else
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm.git/commitdiff/94807250802131fe44a54a355f2bc0a9c5f9c809



More information about the pld-cvs-commit mailing list