RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmfi.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Sun 19 Aug 2007 - 15:49:25 CEST
Message-Id: <20070819134925.8E86C348458@rpm5.org>
  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:   19-Aug-2007 15:49:25
  Branch: HEAD                             Handle: 2007081914492401

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpmfi.c

  Log:
    - load/unload header macros for %{_sourcedir} et al expansions.

  Summary:
    Revision    Changes     Path
    1.1589      +1  -0      rpm/CHANGES
    2.75        +5  -1      rpm/lib/rpmfi.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1588 -r1.1589 CHANGES
  --- rpm/CHANGES	19 Aug 2007 02:34:48 -0000	1.1588
  +++ rpm/CHANGES	19 Aug 2007 13:49:24 -0000	1.1589
  @@ -1,4 +1,5 @@
   4.5 -> 5.0:
  +    - jbj: load/unload header macros for %{_sourcedir} et al expansions.
       - jbj: don't open rpmdb O_RDWR iff srpm to permit non-root installs.
       - jbj: prepare for open as a macro in bleeding edge glibc-2.6.90+.
       - jbj: permit mixed binary/source installation transactions.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmfi.c
  ============================================================================
  $ cvs diff -u -r2.74 -r2.75 rpmfi.c
  --- rpm/lib/rpmfi.c	18 Aug 2007 21:32:29 -0000	2.74
  +++ rpm/lib/rpmfi.c	19 Aug 2007 13:49:25 -0000	2.75
  @@ -1524,7 +1524,6 @@
   	_fdupe(fi, fddictx);
   	_fdupe(fi, fddictn);
   
  -	fi->h = headerFree(fi->h);
       } else if (fi->isSource)	/* XXX SRPM's always re-alloc fi->dil */
   	_fdupe(fi, dil);
   
  @@ -1533,11 +1532,13 @@
   	char * te;
   	size_t nb;
   
  +	headerMacrosLoad(fi->h);
   	av[0] = rpmGenPath(rpmtsRootDir(ts), "%{_sourcedir}", "");
   	av[1] = rpmGenPath(rpmtsRootDir(ts), "%{_specdir}", "");
   	av[2] = rpmGenPath(rpmtsRootDir(ts), "%{_patchdir}", "");
   	av[3] = rpmGenPath(rpmtsRootDir(ts), "%{_icondir}", "");
   	av[4] = NULL;
  +	headerMacrosUnload(fi->h);
   
   	/* Hack up a header RPM_STRING_ARRAY_TYPE array. */
   	fi->dnl = hfd(fi->dnl, -1);
  @@ -1575,6 +1576,9 @@
   	}
       }
   
  +    if (!scareMem)
  +	fi->h = headerFree(fi->h);
  +
       dnlmax = -1;
       for (i = 0; i < fi->dc; i++) {
   	if ((len = strlen(fi->dnl[i])) > dnlmax)
  @@ .
Received on Sun Aug 19 15:49:25 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.