diff options
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/PkgCfl.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/PkgCfl.pm b/usr.sbin/pkg_add/OpenBSD/PkgCfl.pm index bab4266bd64..06a5558348a 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.2 2004/08/06 07:51:17 espie Exp $ +# $OpenBSD: PkgCfl.pm,v 1.3 2004/09/14 22:49:36 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -51,7 +51,7 @@ sub conflicts_with my ($self, @pkgnames) = @_; for my $cfl (@$self) { if (grep { m/$cfl/ } @pkgnames) { - return 1; + return grep { m/$cfl/ } @pkgnames; } } return 0; diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index f81d1a137df..518a160ac07 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.52 2004/09/14 22:47:48 espie Exp $ +# $OpenBSD: pkg_add,v 1.53 2004/09/14 22:49:36 espie Exp $ # # Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org> # @@ -351,7 +351,8 @@ sub pre_add($$) my $l = OpenBSD::PkgCfl->make_conflict_list($plist); $handle->{conflicts} = $l; if ($l->conflicts_with(installed_packages())) { - print "package $pkg has conflicts\n"; + print "package $pkg has conflicts: ", + join(' ', $l->conflicts_with(installed_packages())), "\n"; $errors++; return undef unless $forced{conflicts}; } |