diff --git a/infrastructure/bin/dpb b/infrastructure/bin/dpb index 048bb191934..cd4d03f2273 100755 --- a/infrastructure/bin/dpb +++ b/infrastructure/bin/dpb @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: dpb,v 1.88 2013/04/13 10:02:11 espie Exp $ +# $OpenBSD: dpb,v 1.89 2013/04/22 10:06:12 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -803,6 +803,7 @@ if (!$state->opt('e') && !$occupied) { $core->mark_ready; } +DPB::PkgPath->sanity_check($state); $state->engine->check_buildable; if ($state->{scan_only}) { diff --git a/infrastructure/lib/DPB/PkgPath.pm b/infrastructure/lib/DPB/PkgPath.pm index d6bc5dd06bd..b33ea5e771a 100644 --- a/infrastructure/lib/DPB/PkgPath.pm +++ b/infrastructure/lib/DPB/PkgPath.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: PkgPath.pm,v 1.37 2013/04/13 10:04:43 espie Exp $ +# $OpenBSD: PkgPath.pm,v 1.38 2013/04/22 10:06:12 espie Exp $ # # Copyright (c) 2010 Marc Espie # @@ -42,6 +42,28 @@ sub clone_properties $n->{info} //= $o->{info}; } +sub sanity_check +{ + my ($class, $state) = @_; + + open my $quicklog, '>>', $state->logger->logfile('equiv'); + for my $p ($class->seen) { + next if defined $p->{category}; + for my $w ($p->build_path_list) { + if (!defined $w->{info}) { + print $quicklog $w->fullpkgpath, + " has no info(", $p->fullpkgpath, ")\n"; + $w->{info} = DPB::PortInfo->stub; + } elsif (!defined $w->{info}{FULLPKGNAME}) { + print $quicklog $w->fullpkgpath, + " has no fullpkgname(", + $p->fullpkgpath, ")\n"; + $w->{info} = DPB::PortInfo->stub; + } + } + } +} + # XXX All this code knows too much about PortInfo for proper OO sub fullpkgname