Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Dec 2015 10:53:25 +0000 (UTC)
From:      Alex Kozlov <ak@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r403903 - in head/archivers/rpm2cpio: . files
Message-ID:  <201512171053.tBHArP7J017079@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@FreeBSD.org
+MAINTAINER=	ak@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";



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201512171053.tBHArP7J017079>