diff options
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index e12a164c3df..84d51072262 100644 --- a/usr.sbin/pkg_add/pkg_delete +++ b/usr.sbin/pkg_add/pkg_delete @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_delete,v 1.16 2003/12/21 18:41:23 espie Exp $ +# $OpenBSD: pkg_delete,v 1.17 2004/01/27 00:08:31 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -302,7 +302,11 @@ sub delete_package my $name = $item->{name}; next if defined $removed->{$name}; print "remove dependency in $name\n" if $opt_v or $opt_n; - OpenBSD::RequiredBy->new($name)->delete($pkgname) unless $opt_n; + local $@; + eval { OpenBSD::RequiredBy->new($name)->delete($pkgname) unless $opt_n; }; + if ($@) { + print STDERR "$@\n"; + } $removed->{$name} = 1; } remove_packing_info($dir) unless $opt_n; |