From: espie Date: Fri, 12 Aug 2016 11:17:37 +0000 (+0000) Subject: band-aid for a nasty bug. tieto + space constraints don't interact well. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=fbd6333a2747daa8c6680c2f309b73ccdac6ad5b;p=openbsd band-aid for a nasty bug. tieto + space constraints don't interact well. there are better fixes (such as computing tieto first, computing the size better, and doing two passes deletes), but at least this one doesn't fuck things up. --- diff --git a/usr.sbin/pkg_add/OpenBSD/Add.pm b/usr.sbin/pkg_add/OpenBSD/Add.pm index 96f38dce79e..9b7f174dfcc 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.170 2016/04/02 12:18:44 espie Exp $ +# $OpenBSD: Add.pm,v 1.171 2016/08/12 11:17:37 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -420,7 +420,8 @@ use OpenBSD::Temp; sub find_extractible { my ($self, $state, $wanted, $tied) = @_; - if ($self->{tieto} || $self->{link} || $self->{symlink}) { + if ($self->{tieto} && !$state->{delete_first} + || $self->{link} || $self->{symlink}) { $tied->{$self->name} = $self; } else { $wanted->{$self->name} = $self;