RPM Package Manager, CVS Repository
http://rpm5.org/cvs/
____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson
Root: /v/rpm/cvs Email: jbj@rpm5.org
Module: rpm Date: 22-Jul-2007 03:54:12
Branch: HEAD Handle: 2007072202541200
Modified files:
rpm macros.in
rpm/build parsePrep.c
rpm/rpmio macro.c
Log:
revert all %patch changes, fixing %patch.
Summary:
Revision Changes Path
2.87 +3 -3 rpm/build/parsePrep.c
1.184 +2 -2 rpm/macros.in
2.134 +6 -1 rpm/rpmio/macro.c
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: rpm/build/parsePrep.c
============================================================================
$ cvs diff -u -r2.86 -r2.87 parsePrep.c
--- rpm/build/parsePrep.c 22 Jul 2007 01:39:29 -0000 2.86
+++ rpm/build/parsePrep.c 22 Jul 2007 01:54:12 -0000 2.87
@@ -54,7 +54,7 @@
return 0;
}
-#ifdef DYING
+#ifndef DYING
/**
* Expand %patchN macro into %prep scriptlet.
* @param spec build info
@@ -467,7 +467,7 @@
return 0;
}
-#ifdef DYING
+#ifndef DYING
/**
* Parse %patch line.
* @param spec build info
@@ -756,7 +756,7 @@
/*@-boundsread@*/
if (! strncmp(cp, "%setup", sizeof("%setup")-1)) {
res = doSetupMacro(spec, cp);
-#ifdef DYING
+#ifndef DYING
} else if (! strncmp(cp, "%patch", sizeof("%patch")-1)) {
res = doPatchMacro(spec, cp);
#endif
@@ .
patch -p0 <<'@@ .'
Index: rpm/macros.in
============================================================================
$ cvs diff -u -r1.183 -r1.184 macros.in
--- rpm/macros.in 22 Jul 2007 01:33:34 -0000 1.183
+++ rpm/macros.in 22 Jul 2007 01:54:12 -0000 1.184
@@ -1,7 +1,7 @@
#/*! \page config_macros Default configuration: @USRLIBRPM@/macros
# \verbatim
#
-# $Id: macros.in,v 1.183 2007/07/22 01:33:34 jbj Exp $
+# $Id: macros.in,v 1.184 2007/07/22 01:54:12 jbj Exp $
#
# This is a global RPM configuration file. All changes made here will
# be lost when the rpm package is upgraded. Any per-system configuration
@@ -387,7 +387,7 @@
# a file and aplly using patch(1).
#
-%patch(b:p:P:REz:F:d:) \
+%Xpatch(b:p:P:REz:F:d:) \
%define patch_file %{P:%{-P:%{-P*}}%{!-P:%%PATCH0}} \
%define patch_suffix %{-b:-b --suffix %{-b*}}%{-z:--suffix %{-z*}}
echo "Patch #%{-P:%{-P*}}%{!-P:0} (%{basename:%patch_file}):" \
@@ .
patch -p0 <<'@@ .'
Index: rpm/rpmio/macro.c
============================================================================
$ cvs diff -u -r2.133 -r2.134 macro.c
--- rpm/rpmio/macro.c 22 Jul 2007 00:59:08 -0000 2.133
+++ rpm/rpmio/macro.c 22 Jul 2007 01:54:12 -0000 2.134
@@ -1134,12 +1134,15 @@
buf[gn] = '\0';
(void) expandU(mb, buf, sizeof(buf));
}
+#ifdef NOTYET
if (fn > 5 && STREQ("patch", f, 5) && xisdigit(f[5])) {
for ( c = 5 ; c < fn-1 && f[c] == '0' && xisdigit(f[c+1]) ; c++ ) ; /* Skip leading zeros */
b = buf;
be = stpncpy( stpcpy(b, "%patch -P "), f+c, fn-c);
*be = '\0';
- } else if (STREQ("basename", f, fn)) {
+ } else
+#endif
+ if (STREQ("basename", f, fn)) {
if ((b = strrchr(buf, '/')) == NULL)
b = buf;
else
@@ -1479,6 +1482,7 @@
}
#endif
+#ifdef NOTYET
/* Rewrite "%patchNN ..." as "%patch -P NN ..." and expand. */
if (lastc != NULL && fn > 5 && STREQ("patch", f, 5) && xisdigit(f[5])) {
/*@-internalglobs@*/ /* FIX: verbose may be set */
@@ -1487,6 +1491,7 @@
s = lastc;
continue;
}
+#endif
/* XXX necessary but clunky */
if (STREQ("basename", f, fn) ||
@@ .
Received on Sun Jul 22 03:54:12 2007