summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2005-11-02 22:26:52 +0000
committerMarc Espie <espie@cvs.openbsd.org>2005-11-02 22:26:52 +0000
commit5171b0d6a8511f260dc6ae7a598f5f8f1797a237 (patch)
treead3fd167d11ac1f98c5aba403f637acfa6aa2f9d /usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
parenta99bfe46a16e863f5074e6a07a358f7f06cc89c4 (diff)
In case we are pretending, make sure we skip to the next archive member.
Otherwise, we might miss a truncated archive that's missing its last file, and PKG_CACHE won't work, since it hits a SIGPIPE too soon. Nice testcase from sturm@
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/PackageLocator.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PackageLocator.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
index 4eba0b4beca..58fe47361bc 100644
--- a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: PackageLocator.pm,v 1.46 2005/10/25 23:38:51 espie Exp $
+# $OpenBSD: PackageLocator.pm,v 1.47 2005/11/02 22:26:51 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -838,6 +838,12 @@ sub getNext
return $self->{_archive}->next();
}
+sub skip
+{
+ my $self = shift;
+ return $self->{_archive}->skip();
+}
+
package OpenBSD::FatPackageLocation;
our @ISA=qw(OpenBSD::PackageLocation);