diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2020-02-19 10:53:54 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2020-02-19 10:53:54 +0000 |
commit | 7f1addf19988becfacfbad8700ca04b3e8b8b3fa (patch) | |
tree | 39354868be5d5b3f9d4d8c8fa0f1e29521a62be9 /usr.sbin | |
parent | a4f2045b05a5b49c389ab7036c5288221538ed8b (diff) |
Separate singular and plural
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/ForwardDependencies.pm | 13 |
1 files changed, 9 insertions, 4 deletions
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 <espie@openbsd.org> # @@ -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); + } } } |