RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ CHANGES rpm/lib/ rpmchecksig.c rpminstall.c rpmlead.c

From: Jeff Johnson <jbj@rpm5.org>
Date: Mon 20 Aug 2007 - 00:07:22 CEST
Message-Id: <20070819220722.321F734845B@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:   20-Aug-2007 00:07:22
  Branch: HEAD                             Handle: 2007081923072100

  Modified files:
    rpm                     CHANGES
    rpm/lib                 rpmchecksig.c rpminstall.c rpmlead.c

  Log:
    - permit --ftswalk on sign/verify paths. not yet install ...
    - use ftsOpts from CLI where rpmgi is used.

  Summary:
    Revision    Changes     Path
    1.1595      +2  -0      rpm/CHANGES
    1.133       +13 -7      rpm/lib/rpmchecksig.c
    1.163       +6  -4      rpm/lib/rpminstall.c
    2.46        +6  -6      rpm/lib/rpmlead.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/CHANGES
  ============================================================================
  $ cvs diff -u -r1.1594 -r1.1595 CHANGES
  --- rpm/CHANGES	19 Aug 2007 21:23:54 -0000	1.1594
  +++ rpm/CHANGES	19 Aug 2007 22:07:21 -0000	1.1595
  @@ -1,4 +1,6 @@
   4.5 -> 5.0:
  +    - jbj: permit --ftswalk on sign/verify paths. not yet install ...
  +    - jbj: use ftsOpts from CLI where rpmgi is used.
       - jbj: insure srpm file dispositions are FA_CREATE.
       - jbj: enable Header performance metrics, tied to --stats.
       - jbj: add Header performance metrics, disabled for now.
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmchecksig.c
  ============================================================================
  $ cvs diff -u -r1.132 -r1.133 rpmchecksig.c
  --- rpm/lib/rpmchecksig.c	19 Aug 2007 19:43:11 -0000	1.132
  +++ rpm/lib/rpmchecksig.c	19 Aug 2007 22:07:21 -0000	1.133
  @@ -204,12 +204,15 @@
       /*@-branchstate@*/
       if (argv)
   {       /* start-of-arg-iteration */
  -
  -    rpmgi gi = rpmgiNew(ts, RPMDBI_ARGLIST, NULL, 0);
  -    int _ftsOpts = 0;
  +    int tag = (qva->qva_source == RPMQV_FTSWALK)
  +	? RPMDBI_FTSWALK : RPMDBI_ARGLIST;
  +    rpmgi gi = rpmgiNew(ts, tag, NULL, 0);
       rpmgiFlags _giFlags = RPMGI_NONE;
   
  -    rc = rpmgiSetArgs(gi, argv, _ftsOpts, (_giFlags|RPMGI_NOHEADER));
  +    if (ftsOpts == 0)
  +	ftsOpts = (FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOSTAT);
  +    rc = rpmgiSetArgs(gi, argv, ftsOpts, (_giFlags|RPMGI_NOHEADER));
  +
       while (rpmgiNext(gi) == RPMRC_OK) {
   	const char * fn = rpmgiHdrPath(gi);
   	const char * tfn;
  @@ -1151,12 +1154,15 @@
   
   {       /* start-of-arg-iteration */
   
  -    rpmgi gi = rpmgiNew(ts, RPMDBI_ARGLIST, NULL, 0);
  -    int _ftsOpts = 0;
  +    int tag = (qva->qva_source == RPMQV_FTSWALK)
  +	? RPMDBI_FTSWALK : RPMDBI_ARGLIST;
  +    rpmgi gi = rpmgiNew(ts, tag, NULL, 0);
       rpmgiFlags _giFlags = RPMGI_NONE;
       rpmRC rc;
   
  -    rc = rpmgiSetArgs(gi, argv, _ftsOpts, (_giFlags|RPMGI_NOHEADER));
  +    if (ftsOpts == 0)
  +	ftsOpts = (FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOSTAT);
  +    rc = rpmgiSetArgs(gi, argv, ftsOpts, (_giFlags|RPMGI_NOHEADER));
       while (rpmgiNext(gi) == RPMRC_OK) {
   	const char * fn = rpmgiHdrPath(gi);
   	FD_t fd;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpminstall.c
  ============================================================================
  $ cvs diff -u -r1.162 -r1.163 rpminstall.c
  --- rpm/lib/rpminstall.c	19 Aug 2007 17:43:03 -0000	1.162
  +++ rpm/lib/rpminstall.c	19 Aug 2007 22:07:21 -0000	1.163
  @@ -393,12 +393,14 @@
   #endif
   
   {	/* start-of-transaction-build */
  -
  -    rpmgi gi = rpmgiNew(ts, RPMDBI_ARGLIST, NULL, 0);
  -    int _ftsOpts = 0;
  +    int tag = (ia->qva_source == RPMQV_FTSWALK)
  +	? RPMDBI_FTSWALK : RPMDBI_ARGLIST;
  +    rpmgi gi = rpmgiNew(ts, tag, NULL, 0);
       rpmgiFlags _giFlags = RPMGI_NONE;
   
  -    rc = rpmgiSetArgs(gi, argv, _ftsOpts, _giFlags);
  +    if (ftsOpts == 0)
  +	ftsOpts = (FTS_COMFOLLOW | FTS_LOGICAL | FTS_NOSTAT);
  +    rc = rpmgiSetArgs(gi, argv, ftsOpts, _giFlags);
       while (rpmgiNext(gi) == RPMRC_OK) {
   	Header h = rpmgiHeader(gi);
   	const char * fn;
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmlead.c
  ============================================================================
  $ cvs diff -u -r2.45 -r2.46 rpmlead.c
  --- rpm/lib/rpmlead.c	17 Aug 2007 16:04:51 -0000	2.45
  +++ rpm/lib/rpmlead.c	19 Aug 2007 22:07:21 -0000	2.46
  @@ -64,13 +64,13 @@
       if ((xx = timedRead(fd, (char *)lead, sizeof(*lead))) != sizeof(*lead)) {
   	if (Ferror(fd)) {
   	    (void) snprintf(buf, sizeof(buf),
  -		_("lead size(%u): BAD, read(%d), %s(%d)\n"),
  +		_("lead size(%u): BAD, read(%d), %s(%d)"),
   		(unsigned)sizeof(*lead), xx, Fstrerror(fd), errno);
   	    rc = RPMRC_FAIL;
   	} else {
   	    (void) snprintf(buf, sizeof(buf),
  -		_("lead size(%u): BAD, read(%d)\n"),
  -		(unsigned)sizeof(*lead), xx);
  +		_("lead size(%u): BAD, read(%d), %s(%d)"),
  +		(unsigned)sizeof(*lead), xx, strerror(errno), errno);
   	    rc = RPMRC_NOTFOUND;
   	}
   	goto exit;
  @@ -78,7 +78,7 @@
       /*@=type@*/
   
       if (memcmp(lead->magic, lead_magic, sizeof(lead_magic))) {
  -	(void) snprintf(buf, sizeof(buf), _("lead magic: BAD\n"));
  +	(void) snprintf(buf, sizeof(buf), _("lead magic: BAD"));
   	rc = RPMRC_NOTFOUND;
   	goto exit;
       }
  @@ -90,7 +90,7 @@
       switch (lead->major) {
       default:
   	(void) snprintf(buf, sizeof(buf),
  -		_("lead version(%d): UNSUPPORTED\n"), lead->major);
  +		_("lead version(%d): UNSUPPORTED"), lead->major);
   	rc = RPMRC_NOTFOUND;
   	break;
       case 3:
  @@ -100,7 +100,7 @@
   
       if (lead->signature_type != RPMSIGTYPE_HEADERSIG) {
   	(void) snprintf(buf, sizeof(buf),
  -		_("sigh type(%d): UNSUPPORTED\n"), lead->signature_type);
  +		_("sigh type(%d): UNSUPPORTED"), lead->signature_type);
   	rc = RPMRC_NOTFOUND;
   	goto exit;
       }
  @@ .
Received on Mon Aug 20 00:07:22 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.