From d04e4cd61a32488b4789ef9cf55ffdc5c29852fd Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Mon, 5 Jul 2004 09:22:41 +0000 Subject: less esoteric error message for missing @name, on a question from Brad Webb. --- usr.sbin/pkg_add/OpenBSD/PackingList.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pkg_add/OpenBSD/PackingList.pm b/usr.sbin/pkg_add/OpenBSD/PackingList.pm index e523a6cc60c..7d87c4111de 100644 --- a/usr.sbin/pkg_add/OpenBSD/PackingList.pm +++ b/usr.sbin/pkg_add/OpenBSD/PackingList.pm @@ -1,4 +1,4 @@ -# $OpenBSD: PackingList.pm,v 1.8 2004/05/19 13:05:16 espie Exp $ +# $OpenBSD: PackingList.pm,v 1.9 2004/07/05 09:22:40 espie Exp $ # # Copyright (c) 2003 Marc Espie. # @@ -120,6 +120,10 @@ MAINLOOP: sub write { my ($self, $fh) = @_; + if (!defined $self->{name}) { + print STDERR "Can't write unnamed packing list\n"; + exit 1; + } $self->{name}->write($fh); if (defined $self->{'no-default-conflict'}) { $self->{'no-default-conflict'}->write($fh); -- cgit v1.2.3