From: espie Date: Wed, 20 Apr 2022 14:00:38 +0000 (+0000) Subject: don't try to create a partial-* package when we find out there's nothing X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6580d8fd30d5248485baeed981f8bd36fe25775c;p=openbsd don't try to create a partial-* package when we find out there's nothing where we expected a symlink. --- diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm index 246ee8f3879..ab16c30e16e 100644 --- a/usr.sbin/pkg_add/OpenBSD/Delete.pm +++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Delete.pm,v 1.161 2022/03/17 21:45:51 espie Exp $ +# $OpenBSD: Delete.pm,v 1.162 2022/04/20 14:00:38 espie Exp $ # # Copyright (c) 2003-2014 Marc Espie # @@ -461,8 +461,13 @@ sub delete return; } } else { - $state->say("Bogus symlink: #1", $realname); - $self->do_not_delete($state); + if (-e $realname) { + $state->say("Bogus symlink: #1", $realname); + $self->do_not_delete($state); + } else { + $state->say("Can't delete missing symlink: #1", + $realname); + } return; } } else {