RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES TODO rpm/lib/ rpmgi.c rpminstall.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Thu 31 Jan 2008 - 16:35:09 CET
Message-Id: <20080131153509.F32CF348471@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:   31-Jan-2008 16:35:09
  Branch: HEAD                             Handle: 2008013115350900

  Modified files:
    rpm                     CHANGES TODO
    rpm/lib                 rpmgi.c rpminstall.c

  Log:
    - jbj: fix: functional "-N-V-R.A" erasures-within-upgrade
    transactions.

  Summary:
    Revision    Changes     Path
    1.2114      +1  -0      rpm/CHANGES
    1.125       +1  -0      rpm/TODO
    2.49        +2  -1      rpm/lib/rpmgi.c
    1.191       +10 -8      rpm/lib/rpminstall.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.2113 -r1.2114 CHANGES
  --- rpm/CHANGES	31 Jan 2008 14:23:36 -0000	1.2113
  +++ rpm/CHANGES	31 Jan 2008 15:35:09 -0000	1.2114
  @@ -1,4 +1,5 @@
   5.0.0 -> 5.1a1:
  +    - jbj: fix: functional "-N-V-R.A" erasures-within-upgrade transactions.
       - jbj: fix: retrieve originTime from old, not new, header.
       - jbj: permit "-N-V-R.A" erasure args within install/upgrade transactions.
       - jbj: propagate the time a package was first installed through upgrades (available via tag "ORIGINTIME").
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/TODO
  ============================================================================
  $ cvs diff -u -r1.124 -r1.125 TODO
  --- rpm/TODO	26 Jan 2008 22:55:32 -0000	1.124
  +++ rpm/TODO	31 Jan 2008 15:35:09 -0000	1.125
  @@ -145,6 +145,7 @@
       - jbj: verify(...) with prelinking likely needs more "stuff" in QVA_t:
   D: rpmdb: read h#     512 Header V3 DSA signature: OK, key ID 1ac70ce6
   prelink: Couldn't write file to standard output: Broken pipe
  +    - jbj: handle +bing -bang =boom args within rpmgi.c.
   
   
   
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmgi.c
  ============================================================================
  $ cvs diff -u -r2.48 -r2.49 rpmgi.c
  --- rpm/lib/rpmgi.c	11 Jan 2008 23:05:33 -0000	2.48
  +++ rpm/lib/rpmgi.c	31 Jan 2008 15:35:09 -0000	2.49
  @@ -203,7 +203,8 @@
   	const char * fn;	/* XXX gi->hdrPath? */
   
   	fn = gi->argv[gi->i];
  -	if (!(gi->flags & RPMGI_NOHEADER)) {
  +	/* XXX Skip +bing -bang =boom special arguments. */
  +	if (strchr("-+=", *fn) == NULL && !(gi->flags & RPMGI_NOHEADER)) {
   	    h = rpmgiReadHeader(gi, fn);
   	    if (h != NULL)
   		rpmrc = RPMRC_OK;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpminstall.c
  ============================================================================
  $ cvs diff -u -r1.190 -r1.191 rpminstall.c
  --- rpm/lib/rpminstall.c	30 Jan 2008 22:26:56 -0000	1.190
  +++ rpm/lib/rpminstall.c	31 Jan 2008 15:35:09 -0000	1.191
  @@ -436,29 +436,31 @@
   /*@=mods@*/
       rc = rpmgiSetArgs(gi, argv, ftsOpts, _giFlags);
       while (rpmgiNext(gi) == RPMRC_OK) {
  -	Header h = rpmgiHeader(gi);
  -	const char * fn;
  +	const char * fn = rpmgiHdrPath(gi);
  +	Header h;
   
  -	if (h == NULL) {
  -	    numFailed++;
  -	    continue;
  -	}
  -	fn = rpmgiHdrPath(gi);
   	/* === Check for erasures within install transaction. */
   	if (fn[0] == '-') {
   	    switch (rpmcliEraseElement(ts, &fn[1])) {
   	    case RPMRC_OK:
  +		numRPMS++;	/* XXX multiple erasures? */
   		break;
   	    case RPMRC_NOTFOUND:
   	    default:
   		rpmlog(RPMLOG_ERR, _("package %s cannot be erased\n"), &fn[1]);
  -		numFailed++;
  +		numFailed++;	/* XXX multiple erasures? */
   		goto exit;
   		/*@notreached@*/ break;
   	    }
   	    continue;
   	}
   
  +	h = rpmgiHeader(gi);
  +	if (h == NULL) {
  +	    numFailed++;
  +	    continue;
  +	}
  +
   	/* === Check for relocatable package. */
   	if (relocations) {
   	    he->tag = RPMTAG_PREFIXES;
  @@ .
Received on Thu Jan 31 16:35:10 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.