From 5c5127c140a13cc100b11ce41f7907207967a9d2 Mon Sep 17 00:00:00 2001 From: espie Date: Wed, 9 Mar 2022 12:27:51 +0000 Subject: [PATCH] fix a minor bug that's going to become more relevant: mark cwds as "already" extracted like meta information, so that they end in partial packages --- usr.sbin/pkg_add/OpenBSD/Add.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index cc40120bab6..cc735f4bc97 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.186 2021/08/09 16:41:21 espie Exp $ +# $OpenBSD: Add.pm,v 1.187 2022/03/09 12:27:51 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -76,7 +76,7 @@ sub record_partial_installation $n->set_pkgname($borked); # last file may have not copied correctly - my $last = $n->{state}->{lastfile}; + my $last = $n->{state}{lastfile}; if (defined $last && defined($last->{d})) { my $old = $last->{d}; @@ -310,6 +310,12 @@ sub find_extractible $state->{partial}{$self} = 1; } +package OpenBSD::PackingElement::Cwd; +sub find_extractible +{ + &OpenBSD::PackingElement::Meta::find_extractible; +} + package OpenBSD::PackingElement::ExtraInfo; use OpenBSD::Error; -- 2.20.1