public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Jindrich Novy <jnovy@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - don't treat %patch numberless if -P parameter is present (#463942)
Date: Mon, 23 Nov 2026 09:25:09 GMT	[thread overview]
Message-ID: <179542590987.1.14221769917991140883.rpms-rpm-ff9e0e643037@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : ff9e0e643037cbff6a625345935d8ed6fa021110
Author : Jindrich Novy <jnovy@fedoraproject.org>
Date   : 2008-09-25T17:06:00+00:00
Stats  : +28/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/ff9e0e643037cbff6a625345935d8ed6fa021110?branch=pmatilai-v6

Log:
- don't treat %patch numberless if -P parameter is present (#463942)

---
diff --git a/rpm-4.5.90-patch-P.patch b/rpm-4.5.90-patch-P.patch
new file mode 100644
index 0000000..e5f2d30
--- /dev/null
+++ b/rpm-4.5.90-patch-P.patch
@@ -0,0 +1,22 @@
+commit c4fa73c573f63d2e2b53e75d25feafbf65ebf671
+Author: Jindrich Novy <jnovy@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);

diff --git a/rpm.spec b/rpm.spec
index d957d52..ad55df9 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -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 @@ Patch205: rpm-4.5.90-topdir.patch
 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 @@ that will manipulate RPM packages and databases.
 %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 @@ exit 0
 %doc doc/librpm/html/*
 
 %changelog
+* Thu Sep 25 2008 Jindrich Novy <jnovy@redhat.com>
+- don't treat %patch numberless if -P parameter is present (#463942)
+
 * Thu Sep 11 2008 Panu Matilainen <pmatilai@redhat.com>
 - add hack to support extracting gstreamer plugin provides (#438225)
 - fix another macro argument handling regression (#461180)

                 reply	other threads:[~2026-11-23  9:25 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542590987.1.14221769917991140883.rpms-rpm-ff9e0e643037@fedoraproject.org \
    --to=jnovy@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox