summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2020-05-17 14:34:48 +0000
committerMarc Espie <espie@cvs.openbsd.org>2020-05-17 14:34:48 +0000
commit31d647a649c489eba4f15e31a6bfc5014c3de789 (patch)
tree183e8b3b923f80dbbb5e6f8848ae35184aa1105b
parenta87452b0a14a35955d8289eafdab219d96e52e8f (diff)
in order for PKG_CACHE to work, skipped entries at the end should still
be read. This happens for packages ending in symlinks for instance. this should fix some fringe cases where FETCH_PACKAGES doesn't work
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Add.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm
index eb93531e725..2e06de3071b 100644
--- a/usr.sbin/pkg_add/OpenBSD/Add.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Add.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Add.pm,v 1.183 2019/08/19 12:25:40 espie Exp $
+# $OpenBSD: Add.pm,v 1.184 2020/05/17 14:34:47 espie Exp $
#
# Copyright (c) 2003-2014 Marc Espie <espie@openbsd.org>
#
@@ -132,7 +132,13 @@ sub perform_extraction
$p->advance($e);
}
if (keys %$tied > 0) {
- $handle->{location}{early_close} = 1;
+ # skipped entries should still be read in CACHE mode
+ if (defined $state->cache_directory) {
+ while (my $e = $state->{archive}->next) {
+ }
+ } else {
+ $handle->{location}{early_close} = 1;
+ }
}
last;
}