diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2007-06-26 19:11:29 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2007-06-26 19:11:29 +0000 |
commit | 0d20a49fc64484b695b52c6b23aa4e244c08541e (patch) | |
tree | 0bf08e125f2ee1793436d5adb668803f50152cb3 /usr.sbin | |
parent | f218898f1d95ab986dc32185a097f725d4faf033 (diff) |
fix pkg_info's find_by_path behavior, which I accidentally broke two
versions back...
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/pkg_info | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/pkg_info b/usr.sbin/pkg_add/pkg_info index e51dd170ae4..d0d995034a4 100644 --- a/usr.sbin/pkg_add/pkg_info +++ b/usr.sbin/pkg_add/pkg_info @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_info,v 1.62 2007/06/20 13:44:39 espie Exp $ +# $OpenBSD: pkg_info,v 1.63 2007/06/26 19:11:28 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -220,10 +220,8 @@ sub just_in_time_header { my ($pkg, $handle, $rdone) = @_; return if $$rdone == 1; - if ($terse) { - print $opt_l, $pkg, "\n" unless $opt_q; - } else { - print $opt_l, "Information for ", $handle->url, "\n\n" unless $opt_q; + if (!$terse && !$opt_q) { + print $opt_l, "Information for ", $handle->url, "\n\n"; } $$rdone = 1; } @@ -454,6 +452,9 @@ if (@sought_files) { } for my $pkg (@ARGV) { + if ($terse && !$opt_q) { + print $opt_l, $pkg, "\n"; + } find_pkg($pkg, \&print_info); } if ($pkgs > 1) { |