- fix regression in patch number handling (#455872)

This commit is contained in:
Panu Matilainen 2008-07-19 12:31:18 +00:00
parent 469c1cfe44
commit e62394bdc9
2 changed files with 39 additions and 1 deletions

32
rpm-4.5.90-patchnum.patch Normal file
View File

@ -0,0 +1,32 @@
commit 6df78d16a68ff508a965ba2166f3b376e850b138
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Sat Jul 19 15:27:42 2008 +0300
Fix regression in %patch handling (rhbz#455872)
- popt doesn't think of "008" as an integer, let popt think it's a string
as we do our own conversion to number anyway
diff --git a/build/parsePrep.c b/build/parsePrep.c
index 4b0ccdf..fcc28c8 100644
--- a/build/parsePrep.c
+++ b/build/parsePrep.c
@@ -403,16 +403,16 @@ static int doSetupMacro(rpmSpec spec, const char *line)
*/
static rpmRC doPatchMacro(rpmSpec spec, const char *line)
{
- char *opt_b;
+ char *opt_b, *opt_P;
char *buf = NULL;
- int opt_P, opt_p, opt_R, opt_E, opt_F;
+ int opt_p, opt_R, opt_E, opt_F;
int argc, c;
const char **argv = NULL;
ARGV_t patch, patchnums = NULL;
rpmRC rc = RPMRC_FAIL; /* assume failure */
struct poptOption const patchOpts[] = {
- { NULL, 'P', POPT_ARG_INT, &opt_P, 'P', NULL, NULL },
+ { NULL, 'P', POPT_ARG_STRING, &opt_P, 'P', NULL, NULL },
{ NULL, 'p', POPT_ARG_INT, &opt_p, 'p', NULL, NULL },
{ NULL, 'R', POPT_ARG_NONE, &opt_R, 'R', NULL, NULL },
{ NULL, 'E', POPT_ARG_NONE, &opt_E, 'E', NULL, NULL },

View File

@ -18,7 +18,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
Release: 0.%{snapver}.8
Release: 0.%{snapver}.9
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@ -35,6 +35,7 @@ Patch100: rpm-4.6.x-no-pkgconfig-reqs.patch
Patch200: rpm-4.5.90-digestlen.patch
Patch201: rpm-4.5.90-mono-magic.patch
Patch202: rpm-4.5.90-macroarg.patch
Patch203: rpm-4.5.90-patchnum.patch
# Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
@ -165,6 +166,7 @@ that will manipulate RPM packages and databases.
%patch200 -p1 -b .diglen
%patch201 -p1 -b .mono-magic
%patch202 -p1 -b .macroarg
%patch203 -p1 -b .patchnum
%if %{with int_bdb}
ln -s db-%{bdbver} db
@ -340,6 +342,10 @@ exit 0
%doc doc/librpm/html/*
%changelog
* Sat Jul 19 2008 Panu Matilainen <pmatilai@redhat.com>
- 4.5.90-0.git8426.9
- fix regression in patch number handling (#455872)
* Tue Jul 15 2008 Panu Matilainen <pmatilai@redhat.com>
- 4.5.90-0.git8426.8
- fix regression in macro argument handling (#455333)