RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/lib/ rpmchecksig.c rpm/rpmdb/ pkgio.c rpmwf.c rpm/rpmio...

From: Anders F. Björklund <afb@rpm5.org>
Date: Fri 23 Nov 2007 - 13:12:34 CET
Message-Id: <20071123121234.5BE6C34845F@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Anders F. Björklund
  Root:   /v/rpm/cvs                       Email:  afb@rpm5.org
  Module: rpm                              Date:   23-Nov-2007 13:12:34
  Branch: HEAD                             Handle: 2007112312123201

  Modified files:
    rpm/lib                 rpmchecksig.c
    rpm/rpmdb               pkgio.c rpmwf.c
    rpm/rpmio               rpmio.c

  Log:
    make build limp along without xar

  Summary:
    Revision    Changes     Path
    1.195       +2  -0      rpm/lib/rpmchecksig.c
    1.56        +6  -0      rpm/rpmdb/pkgio.c
    1.17        +4  -0      rpm/rpmdb/rpmwf.c
    1.109       +6  -0      rpm/rpmio/rpmio.c
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/lib/rpmchecksig.c
  ============================================================================
  $ cvs diff -u -r1.194 -r1.195 rpmchecksig.c
  --- rpm/lib/rpmchecksig.c	22 Nov 2007 22:28:14 -0000	1.194
  +++ rpm/lib/rpmchecksig.c	23 Nov 2007 12:12:32 -0000	1.195
  @@ -832,10 +832,12 @@
   	h = headerFree(h);
       }
   
  +#ifdef WITH_XAR
   if (xar != NULL) {
       if ((xx = rpmxarNext(xar)) != 0)	return RPMRC_FAIL;
       if ((xx = rpmxarPull(xar, "Payload")) != 0) return RPMRC_FAIL;
   }
  +#endif
   
       /* Read the payload from the package. */
       while ((count = Fread(buf, sizeof(buf[0]), sizeof(buf), fd)) > 0)
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/pkgio.c
  ============================================================================
  $ cvs diff -u -r1.55 -r1.56 pkgio.c
  --- rpm/rpmdb/pkgio.c	23 Nov 2007 07:06:01 -0000	1.55
  +++ rpm/rpmdb/pkgio.c	23 Nov 2007 12:12:32 -0000	1.56
  @@ -494,6 +494,7 @@
   	goto exit;
       }
   
  +#ifdef WITH_XAR
       /* Attach rpmxar handler to fd if this is a xar archive. */
       if (xar == NULL) {
   	unsigned char * bh = (unsigned char *)l;
  @@ -524,6 +525,7 @@
   	memcpy(l, b, nb);
   	b = _free(b);
       }
  +#endif
   
       l->type = (unsigned short) ntohs(l->type);
       l->archnum = (unsigned short) ntohs(l->archnum);
  @@ -680,10 +682,12 @@
   	*sighp = NULL;
   
       memset(block, 0, sizeof(block));
  +#ifdef WITH_XAR
   if (xar != NULL) {
       if ((xx = rpmxarNext(xar)) != 0)	return RPMRC_FAIL;
       if ((xx = rpmxarPull(xar, "Signature")) != 0) return RPMRC_FAIL;
   }
  +#endif
       if ((xx = (int) timedRead(fd, (void *)block, sizeof(block))) != (int) sizeof(block)) {
   	(void) snprintf(buf, sizeof(buf),
   		_("sigh size(%d): BAD, read returned %d\n"), (int)sizeof(block), xx);
  @@ -1242,10 +1246,12 @@
   	*hdrp = NULL;
   
       memset(block, 0, sizeof(block));
  +#ifdef WITH_XAR
   if (xar != NULL) {
       if ((xx = rpmxarNext(xar)) != 0)	return RPMRC_FAIL;
       if ((xx = rpmxarPull(xar, "Header")) != 0) return RPMRC_FAIL;
   }
  +#endif
       if ((xx = (int) timedRead(fd, (char *)block, sizeof(block))) != (int)sizeof(block)) {
   	(void) snprintf(buf, sizeof(buf),
   		_("hdr size(%u): BAD, read returned %d\n"), (unsigned)sizeof(block), xx);
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmdb/rpmwf.c
  ============================================================================
  $ cvs diff -u -r1.16 -r1.17 rpmwf.c
  --- rpm/rpmdb/rpmwf.c	23 Nov 2007 07:06:01 -0000	1.16
  +++ rpm/rpmdb/rpmwf.c	23 Nov 2007 12:12:32 -0000	1.17
  @@ -16,6 +16,8 @@
   /*@unchecked@*/
   int _rpmwf_debug = 0;
   
  +#if defined(WITH_XAR)
  +
   rpmRC rpmwfPushXAR(rpmwf wf, const char * fn)
   {
       char * b = NULL;
  @@ -339,3 +341,5 @@
   
       return rc;
   }
  +
  +#endif
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/rpmio/rpmio.c
  ============================================================================
  $ cvs diff -u -r1.108 -r1.109 rpmio.c
  --- rpm/rpmio/rpmio.c	23 Nov 2007 07:06:01 -0000	1.108
  +++ rpm/rpmio/rpmio.c	23 Nov 2007 12:12:33 -0000	1.109
  @@ -345,7 +345,9 @@
   	}
   	fd->ndigests = 0;
   /*@-onlytrans@*/
  +#ifdef WITH_XAR
   	fd->xar = rpmxarFree(fd->xar);
  +#endif
   	fd->dig = pgpDigFree(fd->dig);
   /*@=onlytrans@*/
   	memset(fd, 0, sizeof(*fd));	/* XXX trash and burn */
  @@ -420,7 +422,11 @@
   	    fd->bytesRemain = 0;
       } else
       if (fd->xar != NULL) {
  +#ifdef WITH_XAR
   	rc = xarRead(fd, buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
  +#else
  +	rc = -1;
  +#endif
       } else
   	rc = read(fdFileno(fd), buf, (count > fd->bytesRemain ? fd->bytesRemain : count));
       fdstat_exit(fd, FDSTAT_READ, rc);
  @@ .
Received on Fri Nov 23 13:12:34 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.