svn commit: r403903 - in head/archivers/rpm2cpio: . files

Alex Kozlov ak at FreeBSD.org
Thu Dec 17 10:53:27 UTC 2015


Author: ak
Date: Thu Dec 17 10:53:25 2015
New Revision: 403903
URL: https://svnweb.freebsd.org/changeset/ports/403903

Log:
  - Minor fixes
  - Take maintainership
  
  RIP nox@

Modified:
  head/archivers/rpm2cpio/Makefile
  head/archivers/rpm2cpio/files/rpm2cpio

Modified: head/archivers/rpm2cpio/Makefile
==============================================================================
--- head/archivers/rpm2cpio/Makefile	Thu Dec 17 10:38:18 2015	(r403902)
+++ head/archivers/rpm2cpio/Makefile	Thu Dec 17 10:53:25 2015	(r403903)
@@ -3,12 +3,12 @@
 
 PORTNAME=	rpm2cpio
 PORTVERSION=	1.3
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	archivers
 MASTER_SITES=	# none
 DISTFILES=	# none
 
-MAINTAINER=	ports at FreeBSD.org
+MAINTAINER=	ak at FreeBSD.org
 COMMENT=	Convert .rpm files for extraction with /usr/bin/cpio, needs just perl
 
 NO_WRKSUBDIR=	yes

Modified: head/archivers/rpm2cpio/files/rpm2cpio
==============================================================================
--- head/archivers/rpm2cpio/files/rpm2cpio	Thu Dec 17 10:38:18 2015	(r403902)
+++ head/archivers/rpm2cpio/files/rpm2cpio	Thu Dec 17 10:53:25 2015	(r403903)
@@ -44,14 +44,14 @@ if ($#ARGV == -1) {
 	exit 0;
 }
 
-read $f, $rpm, 96;
+die "No header\n" unless (96 == read $f, $rpm, 96);
 
 my ($magic, $major, undef) = unpack("NCC", $rpm);
 
 die "Not an RPM\n" if $magic != 0xedabeedb;
 die "Not a version 3 or 4 RPM\n" if $major != 3 and $major != 4;
 
-read $f, $rpm, 16 or die "No header\n";
+die "No header\n" unless (16 == read $f, $rpm, 16);
 while(1) {
 	($magic, undef, my $sections, my $bytes) = unpack("N4", $rpm);
 	my ($smagic, $smagic2) = unpack("nN", $rpm);
@@ -82,9 +82,9 @@ while(1) {
 	# skip the headers
 	seek $f, 16 * $sections + $bytes, 1 or die "File is too small\n";
 	do {
-		read $f, $rpm, 1 or die "No header\n" ;
+		read $f, $rpm, 1 or die "No header\n";
 	} while(0 == unpack("C", $rpm));
-	read $f, $rpm, 15, 1 or die "No header\n" ;
+	die "No header\n" unless (15 == read $f, $rpm, 15, 1);
 }
 
 open(ZCAT, "| $filter") or die "can't pipe to $filter\n";


More information about the svn-ports-head mailing list