RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Jeff Johnson
  Root:   /v/rpm/cvs                       Email:  [EMAIL PROTECTED]
  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)
  @@ .
______________________________________________________________________
RPM Package Manager                                    http://rpm5.org
CVS Sources Repository                                [email protected]

Reply via email to