diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-08-22 11:30:31 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-08-22 11:30:31 +0000 |
commit | 97bf755d90795d170b1988570be062211827590e (patch) | |
tree | bfa6bd7937c90fb73cffe7da7ce0d48fce7bacc2 | |
parent | f852fb898ffcd373ace58494eef8f25f7efa226a (diff) |
while scanning a potential package, process issues anyways:
if create() fails, we want to remove any stub file (and report the
problem), so that tools won't get confused in believing the packing-list
got created correctly.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PackageLocator.pm | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm index 0706d61bc12..9bfd62dff0e 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackageLocator.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PackageLocator.pm,v 1.19 2005/08/19 00:10:56 espie Exp $ +# $OpenBSD: PackageLocator.pm,v 1.20 2005/08/22 11:30:30 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -398,7 +398,12 @@ OKAY: while (my $e = $self->next()) { if ($e->isFile() && is_info_name($e->{name})) { $e->{name}=$dir.$e->{name}; - eval { $e->create(); } + eval { $e->create(); }; + if ($@) { + unlink($e->{name}); + $@ =~ s/\s+at.*//; + print STDERR $@; + } } else { $self->unput(); last; |