From 14093141b398db2c5190f0580224c85fd23164ae Mon Sep 17 00:00:00 2001 From: espie Date: Sun, 17 May 2020 14:34:47 +0000 Subject: 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 --- usr.sbin/pkg_add/OpenBSD/Add.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'usr.sbin/pkg_add') 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 # @@ -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; } -- cgit v1.2.3-59-g8ed1b