From 7f1addf19988becfacfbad8700ca04b3e8b8b3fa Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Wed, 19 Feb 2020 10:53:54 +0000 Subject: Separate singular and plural --- usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm b/usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm index d568ec49ea0..ca8f7010239 100644 --- a/usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm +++ b/usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: ForwardDependencies.pm,v 1.15 2018/12/17 13:51:21 espie Exp $ +# $OpenBSD: ForwardDependencies.pm,v 1.16 2020/02/19 10:53:53 espie Exp $ # # Copyright (c) 2009 Marc Espie # @@ -77,9 +77,14 @@ sub dump my ($self, $result, $state) = @_; $state->say("#1 forward dependencies:", $self->{set}->print); while (my ($pkg, $l) = each %$result) { - my $deps = join(',', map {$_->{pattern}} @$l); - $state->say("| Dependencies of #1 on #2 don't match", - $pkg, $deps); + if (@$l == 1) { + $state->say("| Dependency of #1 on #2 doesn't match", + $pkg, $l->[0]{pattern}); + } else { + my $deps = join(',', map {$_->{pattern}} @$l); + $state->say("| Dependencies of #1 on #2 don't match", + $pkg, $deps); + } } } -- cgit v1.2.3