RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/rpmio/ macro.c

From: Mark Hatle <fray@rpm5.org>
Date: Mon 16 Jul 2007 - 02:33:12 CEST
Message-Id: <20070716003312.10A9B3484F3@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Mark Hatle
  Root:   /v/rpm/cvs                       Email:  fray@rpm5.org
  Module: rpm                              Date:   16-Jul-2007 02:33:12
  Branch: HEAD                             Handle: 2007071601331100

  Modified files:
    rpm/rpmio               macro.c

  Log:
    ONE more corner case..  Can't strip the single 0 off of "%patch0".

  Summary:
    Revision    Changes     Path
    2.125       +1  -1      rpm/rpmio/macro.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/rpmio/macro.c
  ============================================================================
  $ cvs diff -u -r2.124 -r2.125 macro.c
  --- rpm/rpmio/macro.c	15 Jul 2007 23:19:57 -0000	2.124
  +++ rpm/rpmio/macro.c	16 Jul 2007 00:33:11 -0000	2.125
  @@ -1135,7 +1135,7 @@
   	(void) expandU(mb, buf, sizeof(buf));
       }
       if (fn > 5 && STREQ("patch", f, 5) && xisdigit(f[5])) {
  -	for ( c = 5 ; c < fn && f[c] == '0'; c++ ) ; /* Skip leading zeros */
  +	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';
  @@ .
Received on Mon Jul 16 02:33:12 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.