diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2005-03-14 08:46:25 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2005-03-14 08:46:25 +0000 |
commit | ad776cf3a4bc2b5c5168a3a01aae68f868099a25 (patch) | |
tree | 300690bb68c608b2ff01109d3ad080559c862592 /usr.sbin | |
parent | c6ae3437c11492b8cd492307af0dfda67ea01aac (diff) |
report/ignore broken packing-lists.
Happens only to guys who don't run fsck after panics, but hey ! ;-)
okay pval@
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgCfl.pm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCfl.pm b/usr.sbin/pkg_add/OpenBSD/PkgCfl.pm index 105d9809f46..6f54b065cd1 100644 --- a/usr.sbin/pkg_add/OpenBSD/PkgCfl.pm +++ b/usr.sbin/pkg_add/OpenBSD/PkgCfl.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PkgCfl.pm,v 1.10 2004/12/28 13:54:13 espie Exp $ +# $OpenBSD: PkgCfl.pm,v 1.11 2005/03/14 08:46:24 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -33,11 +33,15 @@ sub glob2re return "^$_\$"; } -sub make_conflict_list($) +sub make_conflict_list { - my ($class, $plist) = @_; + my ($class, $plist, $pkg) = @_; my $l = []; my $pkgname = $plist->pkgname(); + if (!defined $pkgname) { + print STDERR "No pkgname in packing-list for $pkg\n"; + return; + } my $stem = OpenBSD::PackageName::splitstem($pkgname); unless (defined $plist->{'no-default-conflict'}) { @@ -92,7 +96,7 @@ sub fill_conflict_lists($) my $plist = OpenBSD::PackingList->from_installation($pkg, \&OpenBSD::PackingList::ConflictOnly); next unless defined $plist; - $plist->{conflicts} = OpenBSD::PkgCfl->make_conflict_list($plist); + $plist->{conflicts} = OpenBSD::PkgCfl->make_conflict_list($plist, $pkg); register($plist, $state); } } |