diff options
author | tron <tron@pkgsrc.org> | 2010-09-05 01:22:29 +0000 |
---|---|---|
committer | tron <tron@pkgsrc.org> | 2010-09-05 01:22:29 +0000 |
commit | 29b018b3ebbb9fabb7d4dc3b1a0ce95eb70772df (patch) | |
tree | 96c58fe8e142e01d57a0c3c2acf98801d9307bf0 /pkgtools/rpm2pkg | |
parent | 70b3f0a59cb1f0b8d696a72a84ad6dfcbbecd7f2 (diff) | |
download | pkgsrc-29b018b3ebbb9fabb7d4dc3b1a0ce95eb70772df.tar.gz |
Update "rpm2pkg" package to version 3.1.2 (*sigh*):
Fix bug in last change which broke extracting RPMs via "lzcat" (which is
now also used for uncompressed RPMs).
Diffstat (limited to 'pkgtools/rpm2pkg')
-rw-r--r-- | pkgtools/rpm2pkg/Makefile | 7 | ||||
-rw-r--r-- | pkgtools/rpm2pkg/files/rpm2pkg.c | 13 |
2 files changed, 13 insertions, 7 deletions
diff --git a/pkgtools/rpm2pkg/Makefile b/pkgtools/rpm2pkg/Makefile index 4afd9b52fa3..bc3e066a528 100644 --- a/pkgtools/rpm2pkg/Makefile +++ b/pkgtools/rpm2pkg/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.48 2010/09/05 00:24:30 tron Exp $ +# $NetBSD: Makefile,v 1.49 2010/09/05 01:22:29 tron Exp $ -DISTNAME= rpm2pkg-3.1.1 +DISTNAME= rpm2pkg-3.1.2 CATEGORIES= pkgtools MASTER_SITES= # empty DISTFILES= # empty @@ -29,6 +29,9 @@ LIBS+= -lintl -lz -lbz2 CFLAGS+= -Wall -Wshadow -Wsign-compare -Wunused-value .endif +CFLAGS+= -g +LDFLAGS+= -g + INSTALLATION_DIRS= ${PKGMANDIR}/man8 sbin do-build: diff --git a/pkgtools/rpm2pkg/files/rpm2pkg.c b/pkgtools/rpm2pkg/files/rpm2pkg.c index 223d4a58898..715a1a0b4ed 100644 --- a/pkgtools/rpm2pkg/files/rpm2pkg.c +++ b/pkgtools/rpm2pkg/files/rpm2pkg.c @@ -1,4 +1,4 @@ -/* $NetBSD: rpm2pkg.c,v 1.13 2010/09/05 00:24:30 tron Exp $ */ +/* $NetBSD: rpm2pkg.c,v 1.14 2010/09/05 01:22:29 tron Exp $ */ /*- * Copyright (c) 2001-2010 The NetBSD Foundation, Inc. @@ -360,9 +360,12 @@ Read(FileHandle *fh, void *buffer, size_t length) } else if (fh->fh_GZFile != NULL) { bytes = gzread(fh->fh_GZFile, buffer, length); } else if (fh->fh_Pipe >= 0) { + size_t remainder; + + remainder = length; bytes = 0; - while (length > 0) { - ssize_t chunk = read(fh->fh_Pipe, buffer, length); + while (remainder > 0) { + ssize_t chunk = read(fh->fh_Pipe, buffer, remainder); if (chunk < 0) { bytes = -1; break; @@ -370,8 +373,8 @@ Read(FileHandle *fh, void *buffer, size_t length) break; } - buffer += chunk; - length -= chunk; + buffer = (uint8_t *)buffer + chunk; + remainder -= chunk; bytes += chunk; } |