summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_add
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2020-05-17 14:34:47 +0000
committerespie <espie@openbsd.org>2020-05-17 14:34:47 +0000
commit14093141b398db2c5190f0580224c85fd23164ae (patch)
tree651655da9c8fedee8b0b78d235c34bd17d74711e /usr.sbin/pkg_add
parentAdd missing definition tags to abbreviated commands. As an example, (diff)
downloadwireguard-openbsd-14093141b398db2c5190f0580224c85fd23164ae.tar.xz
wireguard-openbsd-14093141b398db2c5190f0580224c85fd23164ae.zip
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
Diffstat (limited to 'usr.sbin/pkg_add')
-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;
}