diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-01-27 00:04:37 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-01-27 00:04:37 +0000 |
commit | 540b045e24f7ba00f95a5323d9de705f5a858df9 (patch) | |
tree | 4c3bdbe3c60981dbbdbd55ac41426fdd9fcee6b8 /usr.sbin/pkg_add/OpenBSD | |
parent | 4b4e6dcb3f2a9873179163ebb398ff619f4da907 (diff) |
put $! in die messages.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/RequiredBy.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/RequiredBy.pm b/usr.sbin/pkg_add/OpenBSD/RequiredBy.pm index 0ac99cbd5f1..81fbaa380ec 100644 --- a/usr.sbin/pkg_add/OpenBSD/RequiredBy.pm +++ b/usr.sbin/pkg_add/OpenBSD/RequiredBy.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: RequiredBy.pm,v 1.1 2003/10/16 17:43:34 espie Exp $ +# $OpenBSD: RequiredBy.pm,v 1.2 2004/01/27 00:04:36 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -43,7 +43,7 @@ sub list($) my $l = []; return $l unless -f $$self; open(my $fh, '<', $$self) or - die "Problem opening required list: $$self\n"; + die "Problem opening required list: $$self: $!"; local $_; while(<$fh>) { chomp $_; @@ -59,7 +59,7 @@ sub delete { my ($self, $pkgname) = @_; my @lines = grep { $_ ne $pkgname } @{$self->list()}; - unlink($$self) or die "Can't erase $$self"; + unlink($$self) or die "Can't erase $$self: $!"; if (@lines > 0) { $self->add(@lines); } @@ -69,7 +69,7 @@ sub add { my ($self, @pkgnames) = @_; open(my $fh, '>>', $$self) or - die "Can't add dependencies to $$self"; + die "Can't add dependencies to $$self: $!"; print $fh join("\n", @pkgnames), "\n"; close($fh); } |