rpms/rpm/devel rpm-4.5.90-patch-P.patch, NONE, 1.1 rpm.spec, 1.296, 1.297

Jindrich Novy jnovy at fedoraproject.org
Thu Sep 25 17:06:30 UTC 2008


Author: jnovy

Update of /cvs/pkgs/rpms/rpm/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16088

Modified Files:
	rpm.spec 
Added Files:
	rpm-4.5.90-patch-P.patch 
Log Message:
* Thu Sep 25 2008 Jindrich Novy <jnovy at redhat.com>
- don't treat %patch numberless if -P parameter is present (#463942)


rpm-4.5.90-patch-P.patch:

--- NEW FILE rpm-4.5.90-patch-P.patch ---
commit c4fa73c573f63d2e2b53e75d25feafbf65ebf671
Author: Jindrich Novy <jnovy at redhat.com>
Date:   Wed Sep 24 18:39:43 2008 +0200

    Don't treat %patch numberless if -P parameter is present

diff --git a/build/parsePrep.c b/build/parsePrep.c
index 2be0693..bfef325 100644
--- a/build/parsePrep.c
+++ b/build/parsePrep.c
@@ -431,7 +431,10 @@ static rpmRC doPatchMacro(rpmSpec spec, const char *line)
     if (! strchr(" \t\n", line[6])) {
 	rasprintf(&buf, "%%patch -P %s", line + 6);
     } else {
-	rasprintf(&buf, "%%patch -P %d %s", INT_MAX, line + 6); /* INT_MAX denotes not numbered %patch */
+	if (strstr(line+6, " -P") == NULL)
+	    rasprintf(&buf, "%%patch -P %d %s", INT_MAX, line + 6); /* INT_MAX denotes not numbered %patch */
+	else
+	    buf = strdup(line); /* it is not numberless patch because -P is present */
     }
     poptParseArgvString(buf, &argc, &argv);
     free(buf);


Index: rpm.spec
===================================================================
RCS file: /cvs/pkgs/rpms/rpm/devel/rpm.spec,v
retrieving revision 1.296
retrieving revision 1.297
diff -u -r1.296 -r1.297
--- rpm.spec	11 Sep 2008 12:02:10 -0000	1.296
+++ rpm.spec	25 Sep 2008 17:06:00 -0000	1.297
@@ -18,7 +18,7 @@
 Summary: The RPM package management system
 Name: rpm
 Version: %{rpmver}
-Release: 0.%{snapver}.7
+Release: 0.%{snapver}.8
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@@ -42,6 +42,7 @@
 Patch206: rpm-4.5.90-rpmbuild-dirs.patch
 Patch207: rpm-4.5.90-cpio-hardlink.patch
 Patch208: rpm-4.5.90-macro-args.patch
+Patch209: rpm-4.5.90-patch-P.patch
 
 # These are not yet upstream
 Patch300: rpm-4.5.90-posttrans.patch
@@ -182,6 +183,7 @@
 %patch206 -p1 -b .rpmbuild-dirs
 %patch207 -p1 -b .cpio-hardlink
 %patch208 -p1 -b .macro-args
+%patch209 -p1 -b .patch-P
 
 # needs a bit of upstream love first...
 #%patch300 -p1 -b .posttrans
@@ -360,6 +362,9 @@
 %doc doc/librpm/html/*
 
 %changelog
+* Thu Sep 25 2008 Jindrich Novy <jnovy at redhat.com>
+- don't treat %patch numberless if -P parameter is present (#463942)
+
 * Thu Sep 11 2008 Panu Matilainen <pmatilai at redhat.com>
 - add hack to support extracting gstreamer plugin provides (#438225)
 - fix another macro argument handling regression (#461180)




More information about the fedora-extras-commits mailing list