summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-12-22 06:49:25 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-12-22 06:49:25 +0000
commit2c34d082c4fa558ecffb397ab7c0cdcbc097e2c4 (patch)
treeaa8144ef21e2fdfddb11bf2c227e814b6d681377 /usr.sbin
parent7a0e6f80451fcd2b8a3504d6ade655136673b9ff (diff)
once we read the list, make sure it matches the dependency.
Otherwise, this WILL turn into an infinite loop indeed !
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/PkgCreate.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
index ff98967e691..d5c6cb3081a 100644
--- a/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
+++ b/usr.sbin/pkg_add/OpenBSD/PkgCreate.pm
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: PkgCreate.pm,v 1.34 2010/12/21 11:25:19 espie Exp $
+# $OpenBSD: PkgCreate.pm,v 1.35 2010/12/22 06:49:24 espie Exp $
#
# Copyright (c) 2003-2010 Marc Espie <espie@openbsd.org>
#
@@ -579,6 +579,11 @@ sub solve_from_ports
open(my $fh, "cd $portsdir && SUBDIR=$dep->{pkgpath} ECHO_MSG=: $make print-plist-with-depends|") or return undef;
my $plist = OpenBSD::PackingList->read($fh,
\&OpenBSD::PackingList::PrelinkStuffOnly);
+ if ($dep->spec->filter($plist->pkgname) == 0) {
+ $state->fatal("Dependency #1 doesn't match FULLPKGNAME: #2",
+ $dep->{pattern}, $plist->pkgname);
+ }
+
OpenBSD::SharedLibs::add_libs_from_plist($plist, $state);
$self->add_dep($plist);
return $plist->pkgname;