Handle patch > 2.1

CVS patchset: 1870
CVS date: 1997/10/23 15:10:03
This commit is contained in:
marc 1997-10-23 15:10:03 +00:00
parent 5bfbd87d1d
commit 636fc4bec9
3 changed files with 8 additions and 5 deletions

View File

@ -7,6 +7,7 @@
code
- make mips compatible with noarch
- fixed bug w/ printing string arrays in conditionals
- handle modern patch programs (> 2.1)
2.4.7 -> 2.4.8:
- added noarch build compatibilities for ppc, m68k

View File

@ -27,6 +27,7 @@
#include "misc.h"
#include "pack.h"
#include "popt/popt.h"
#include "config.h"
#include "names.h"
@ -460,7 +461,10 @@ static char *do_patch(Spec spec, int c, int strip, char *db,
args[0] = '\0';
if (db) {
#if HAVE_OLDPATCH_21 == 0
strcat(args, "-b ");
#endif
strcat(args, "--suffix ");
strcat(args, db);
}
if (reverse) {

View File

@ -69,11 +69,9 @@ if test "$cross_compiling" != "yes"; then
fi
AC_MSG_CHECKING(old version of patch)
PATCHVERSION=`patch --version 2>&1 | awk '{print $3}'`
PATCHMAJOR=`echo $PATCHVERSION | cut -d. -f1`
PATCHMINOR=`echo $PATCHVERSION | cut -d. -f2`
PATCHVERSION=`patch --version 2>&1`
if test $PATCHMAJOR -le 2 -a $PATCHMINOR -le 1; then
if test "$PATCHVERSION" = "Patch version 2.1"; then
AC_DEFINE(HAVE_OLDPATCH_21)
AC_MSG_RESULT(patch older then 2.2 found)
else
@ -406,4 +404,4 @@ AC_SUBST(RPM)
AC_SUBST(GZIPBIN)
AC_SUBST(FIXPERMS)
AC_OUTPUT(Makefile Makefile.inc lib-rpmrc lib/Makefile build/Makefile tools/Makefile po/Makefile misc/Makefile)
AC_OUTPUT(Makefile Makefile.inc lib-rpmrc lib/Makefile build/Makefile newbuild/Makefile tools/Makefile po/Makefile misc/Makefile)