diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-02-04 12:18:40 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-02-04 12:18:40 +0000 |
commit | 6a71cedc9c5fd531e8d88ce0cecff952c8c98194 (patch) | |
tree | f7bb4ccb2a89117e3507bf8b221657a1aefeb7f2 /usr.sbin | |
parent | d36e1285d5b1eaa77c6bee16c3511d828b3a1341 (diff) |
streamline messages for interactive mode, no need to repeat the same list
twice.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Dependencies.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Interactive.pm | 7 |
2 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm index b89858e3dfb..eea335f7b59 100644 --- a/usr.sbin/pkg_add/OpenBSD/Dependencies.pm +++ b/usr.sbin/pkg_add/OpenBSD/Dependencies.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Dependencies.pm,v 1.5 2006/11/17 15:34:15 espie Exp $ +# $OpenBSD: Dependencies.pm,v 1.6 2007/02/04 12:18:39 espie Exp $ # # Copyright (c) 2005 Marc Espie <espie@openbsd.org> # @@ -94,7 +94,7 @@ sub solve @candidates = ((grep {$_ eq $dep->{def}} @candidates), (sort (grep {$_ ne $dep->{def}} @candidates))); my $choice = - OpenBSD::Interactive::ask_list('Choose dependency for '.$plist->pkgname().': ', + OpenBSD::Interactive::ask_list('Ambiguous: choose dependency for '.$plist->pkgname().': ', $state->{interactive}, @candidates); push(@deps, $choice); $to_register->{$choice} = 1; diff --git a/usr.sbin/pkg_add/OpenBSD/Interactive.pm b/usr.sbin/pkg_add/OpenBSD/Interactive.pm index efc6c72ea0d..9b6eb451785 100644 --- a/usr.sbin/pkg_add/OpenBSD/Interactive.pm +++ b/usr.sbin/pkg_add/OpenBSD/Interactive.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Interactive.pm,v 1.5 2006/11/17 15:34:15 espie Exp $ +# $OpenBSD: Interactive.pm,v 1.6 2007/02/04 12:18:39 espie Exp $ # # Copyright (c) 2005 Marc Espie <espie@openbsd.org> # @@ -106,12 +106,13 @@ sub choose1 } elsif (@l == 1) { return $l[0]; } elsif (@l != 0) { - print "Ambiguous: $pkgname could be ", join(' ', @l),"\n"; if ($interactive) { - my $result = OpenBSD::Interactive::ask_list('Choose one package', 1, ("<None>", @l)); + my $result = OpenBSD::Interactive::ask_list("Ambiguous: choose package for $pkgname", 1, ("<None>", @l)); if ($result ne '<None>') { return $result; } + } else { + print "Ambiguous: $pkgname could be ", join(' ', @l),"\n"; } } return; |