RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm-4_5: rpm/ CHANGES rpm/lib/ psm.c transaction.c

From: Elan Ruusamäe <glen@rpm5.org>
Date: Wed 06 Feb 2008 - 11:05:20 CET
Message-Id: <20080206100520.B497034845B@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Elan Ruusamäe
  Root:   /v/rpm/cvs                       Email:  glen@rpm5.org
  Module: rpm                              Date:   06-Feb-2008 11:05:20
  Branch: rpm-4_5                          Handle: 2008020610051901

  Modified files:           (Branch: rpm-4_5)
    rpm                     CHANGES
    rpm/lib                 psm.c transaction.c

  Log:
    - backport from 5.0: --rollback PSM_INIT changes added fstates before
    initialize. tested on rpm 4.4.9

  Summary:
    Revision    Changes     Path
    1.1360.2.61 +1  -0      rpm/CHANGES
    2.198.2.4   +25 -4      rpm/lib/psm.c
    1.322.2.4   +0  -3      rpm/lib/transaction.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1360.2.60 -r1.1360.2.61 CHANGES
  --- rpm/CHANGES	16 Dec 2007 22:28:09 -0000	1.1360.2.60
  +++ rpm/CHANGES	6 Feb 2008 10:05:19 -0000	1.1360.2.61
  @@ -1,4 +1,5 @@
   4.4.9 -> 4.5:
  +    - glen: backport from 5.0: --rollback PSM_INIT changes added fstates before initialize.
       - proyvind: add back SOURCEPACKAGE tag for Mandriva to allow packages to be rebuilt on older releases
       - proyvind: add back rpm v3 format support for Mandriva
       - proyvind: rename rpmcliImportPubkey() -> rpmtsImportPubkey() (from and for rpm.org compatibility)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/psm.c
  ============================================================================
  $ cvs diff -u -r2.198.2.3 -r2.198.2.4 psm.c
  --- rpm/lib/psm.c	9 Dec 2007 04:31:34 -0000	2.198.2.3
  +++ rpm/lib/psm.c	6 Feb 2008 10:05:20 -0000	2.198.2.4
  @@ -1493,10 +1493,6 @@
       int xx = 1;
   
   assert(fi->h != NULL);
  -    if (fi->fstates != NULL && fc > 0)
  -	xx = headerAddEntry(fi->h, RPMTAG_FILESTATES, RPM_CHAR_TYPE,
  -				fi->fstates, fc);
  -assert(xx);
   
       xx = headerAddEntry(fi->h, RPMTAG_INSTALLTIME, RPM_INT32_TYPE,
   			&installTime, 1);
  @@ -1526,6 +1522,28 @@
       return 0;
   }
   
  +
  +/**
  + * Add fi->states to an install header.
  + * @param ts		transaction set
  + * @param te		transaction element
  + * @param fi		file info set
  + * @return		0 always
  + */
  +static int postPopulateInstallHeader(const rpmts ts, const rpmte te, rpmfi fi)
  +	/*@modifies fi @*/
  +{
  +    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
  +    int fc = rpmfiFC(fi);
  +    int xx = 1;
  +
  +    if (fi->fstates != NULL && fc > 0) {
  +	xx = headerAddEntry(fi->h, RPMTAG_FILESTATES, RPM_CHAR_TYPE, fi->fstates, fc);
  +    }
  +
  +    return 0;
  +}
  +
   static void * rpmpsmThread(void * arg)
   	/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
   	/*@modifies arg, rpmGlobalMacroContext, fileSystem, internalState @*/
  @@ -2042,6 +2060,9 @@
   		if (rc) break;
   	    }
   
  +	    /* Add fi->fstates to install header. */
  +	    xx = postPopulateInstallHeader(ts, psm->te, fi);
  +
   	    rc = rpmpsmNext(psm, PSM_RPMDB_ADD);
   	    if (rc) break;
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/transaction.c
  ============================================================================
  $ cvs diff -u -r1.322.2.3 -r1.322.2.4 transaction.c
  --- rpm/lib/transaction.c	12 Jul 2007 10:01:21 -0000	1.322.2.3
  +++ rpm/lib/transaction.c	6 Feb 2008 10:05:20 -0000	1.322.2.4
  @@ -876,9 +876,6 @@
   
   /*@-dependenttrans@*/
       if (netsharedPaths) freeSplitString(netsharedPaths);
  -#ifdef	DYING	/* XXX freeFi will deal with this later. */
  -    fi->flangs = _free(fi->flangs);
  -#endif
       if (languages) freeSplitString((char **)languages);
   /*@=dependenttrans@*/
   }
  @@ .
Received on Wed Feb 6 11:05:20 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.