RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES VENDOR rpm/lib/ depends.c psm.c rpm/rpmdb/ rpm...

From: Ralf S. Engelschall <rse@rpm5.org>
Date: Thu 31 Jan 2008 - 08:26:13 CET
Message-Id: <20080131072613.24A28348471@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  rse@rpm5.org
  Module: rpm                              Date:   31-Jan-2008 08:26:13
  Branch: HEAD                             Handle: 2008013107261200

  Modified files:
    rpm                     CHANGES VENDOR
    rpm/lib                 depends.c psm.c
    rpm/rpmdb               rpmtag.h

  Log:
    remove OpenPKG-specific first cut of the origin time implementation
    and consistently use ORIGINTIME as the tag for now

  Summary:
    Revision    Changes     Path
    1.2112      +1  -1      rpm/CHANGES
    2.38        +0  -12     rpm/VENDOR
    1.384       +1  -1      rpm/lib/depends.c
    2.282       +1  -40     rpm/lib/psm.c
    1.37        +1  -1      rpm/rpmdb/rpmtag.h
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2111 -r1.2112 CHANGES
  --- rpm/CHANGES	30 Jan 2008 22:26:56 -0000	1.2111
  +++ rpm/CHANGES	31 Jan 2008 07:26:12 -0000	1.2112
  @@ -1,6 +1,6 @@
   5.0.0 -> 5.1a1:
       - jbj: permit "-N-V-R.A" erasure args within install/upgrade transactions.
  -    - jbj: propagate the time a package was first installed through upgrades.
  +    - jbj: propagate the time a package was first installed through upgrades (available via tag "ORIGINTIME").
       - jbj: replace sr.po from translation project.
       - jbj: fix: rpmtsCheck() needs to return 1 when problems exist.
       - rse: (again) replace u_int32_t with uint32_t to be consistent across the code base
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/VENDOR
  ============================================================================
  $ cvs diff -u -r2.37 -r2.38 VENDOR
  --- rpm/VENDOR	30 Jan 2008 18:24:13 -0000	2.37
  +++ rpm/VENDOR	31 Jan 2008 07:26:12 -0000	2.38
  @@ -429,18 +429,6 @@
                        during built-time and hence one also needs to be able
                        to override this on the command line.
        ________________________________________________________________________
  -     
  -     Change:         additional-tag-installtime1st
  -     Purpose:        Support the tag "INSTALLTIME1ST" which shows the
  -                     first/initial "INSTALLTIME" of a package, even after
  -                     multiple package updates.
  -     Reason:         For multiple reasons (update frontends, etc) it is
  -                     interesting to know when a particular package was
  -                     installed the _first_ time, even if the current
  -                     package version is already the Nth update and hence
  -                     shows a later "install time". The formula used is:
  -                     INSTALLTIME1ST_new = min([INSTALLTIME1ST_old], CURRENTTIME)
  -     ________________________________________________________________________
   
     o  Name:           RPM4DARWIN
        Vendor:         RPM for Darwin (Mac OS X) <http://rpm4darwin.sourceforge.net/>
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/depends.c
  ============================================================================
  $ cvs diff -u -r1.383 -r1.384 depends.c
  --- rpm/lib/depends.c	30 Jan 2008 21:39:30 -0000	1.383
  +++ rpm/lib/depends.c	31 Jan 2008 07:26:12 -0000	1.384
  @@ -432,7 +432,7 @@
   	xx = rpmteChain(p, q, oh, "Upgrades");
   
   	/* Snarf the original install time from older package(s). */
  -	he->tag = tagValue("Installtime1st");
  +	he->tag = RPMTAG_ORIGINTIME;
   	xx = headerGet(h, he, 0);
   	if (xx && he->p.ui32p != NULL) {
   	    if (p->originTime == 0 || p->originTime > he->p.ui32p[0])
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/psm.c
  ============================================================================
  $ cvs diff -u -r2.281 -r2.282 psm.c
  --- rpm/lib/psm.c	30 Jan 2008 21:39:30 -0000	2.281
  +++ rpm/lib/psm.c	31 Jan 2008 07:26:12 -0000	2.282
  @@ -1554,9 +1554,6 @@
       uint32_t originTime = rpmteOriginTime(te);
       int fc = rpmfiFC(fi);
       int xx = 1;
  -#if defined(RPM_VENDOR_OPENPKG) /* additional-tag-installtime1st */
  -    HE_t he_te;
  -#endif
   
   assert(fi->h != NULL);
       if (fi->fstates != NULL && fc > 0) {
  @@ -1576,48 +1573,12 @@
       /* Propagate the time that the package was first installed. */
       if (originTime == 0)
   	originTime = rpmtsGetTid(ts);
  -    he->tag = tagValue("Installtime1st");
  +    he->tag = RPMTAG_ORIGINTIME;
       he->t = RPM_UINT32_TYPE;
       he->p.ui32p = &originTime;
       he->c = 1;
       xx = headerPut(fi->h, he, 0);
   
  -#if defined(RPM_VENDOR_OPENPKG) /* additional-tag-installtime1st */
  -    he_te = memset(alloca(sizeof(*he_te)), 0, sizeof(*he_te));
  -    he_te->tag = RPMTAG_NAME;
  -    if (headerGet(rpmteHeader(te), he_te, 0)) {
  -        const char *name = he_te->p.str;
  -        if (name != NULL) {
  -            rpmts ts;
  -            if ((ts = rpmtsCreate()) != NULL) {
  -                rpmdbMatchIterator mi;
  -                Header h_db;
  -                HE_t he_db;
  -                uint32_t installTime1st;
  -
  -                rpmtsOpenDB(ts, O_RDONLY);
  -                he_db = memset(alloca(sizeof(*he_db)), 0, sizeof(*he_db));
  -                mi = rpmtsInitIterator(ts, RPMTAG_PROVIDENAME, name, 0);
  -                installTime1st = installTime;
  -                while ((h_db = rpmdbNextIterator(mi)) != NULL) {
  -                    he_db->tag = RPMTAG_INSTALLTIME1ST;
  -                    if (headerGet(h_db, he_db, 0))
  -                        if (installTime1st > *(he_db->p.ui32p))
  -                            installTime1st = *(he_db->p.ui32p);
  -                }
  -                mi = rpmdbFreeIterator(mi);
  -                ts = rpmtsFree(ts);
  -
  -                he->tag = RPMTAG_INSTALLTIME1ST;
  -                he->t = RPM_UINT32_TYPE;
  -                he->p.ui32p = &installTime1st;
  -                he->c = 1;
  -                xx = headerPut(fi->h, he, 0);
  -            }
  -        }
  -    }
  -#endif
  -
       he->tag = RPMTAG_INSTALLCOLOR;
       he->t = RPM_UINT32_TYPE;
       he->p.ui32p = &tscolor;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmtag.h
  ============================================================================
  $ cvs diff -u -r1.36 -r1.37 rpmtag.h
  --- rpm/rpmdb/rpmtag.h	30 Jan 2008 18:24:13 -0000	1.36
  +++ rpm/rpmdb/rpmtag.h	31 Jan 2008 07:26:12 -0000	1.37
  @@ -412,7 +412,7 @@
       RPMTAG_SANITYCHECKPROG	= 1206, /* s */
       RPMTAG_FILESTAT		= 1207, /* s[] stat(2) from metadata extension*/
       RPMTAG_STAT			= 1208, /* s[] stat(2) from disk extension */
  -    RPMTAG_INSTALLTIME1ST	= 1209,	/* i */
  +    RPMTAG_ORIGINTIME		= 1209,	/* i */
   
   /*@-enummemuse@*/
       RPMTAG_FIRSTFREE_TAG	/*!< internal */
  @@ .
Received on Thu Jan 31 08:26:13 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.