summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_info
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add/pkg_info')
-rw-r--r--usr.sbin/pkg_add/pkg_info12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/pkg_info b/usr.sbin/pkg_add/pkg_info
index 2e3df805667..5a340fa23ae 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.16 2004/11/11 11:24:15 espie Exp $
+# $OpenBSD: pkg_info,v 1.17 2004/11/11 11:54:09 espie Exp $
#
# Copyright (c) 2003-2004 Marc Espie <espie@openbsd.org>
#
@@ -83,7 +83,7 @@ sub find_by_path
our ($opt_c, $opt_D, $opt_d, $opt_f, $opt_I, $opt_i, $opt_k, $opt_L, $opt_m,
$opt_p, $opt_q, $opt_R, $opt_r, $opt_s, $opt_v, $opt_h, $opt_l,
- $opt_a, $opt_M, $opt_U);
+ $opt_a, $opt_M, $opt_U, $opt_A);
my $terse = 0;
my $exit_code = 0;
@@ -185,7 +185,7 @@ sub print_info
}
}
-getopts('cDdfIikLmpqRrsvhe:MU:l:a',
+getopts('cDdfIikLmpqRrsvhe:MU:l:aA',
{'e' =>
sub {
my $pat = shift;
@@ -225,16 +225,16 @@ if (!defined $opt_p) {
$opt_p = "";
}
-if (@ARGV == 0 && !$opt_a) {
+if (@ARGV == 0 && !$opt_a && !$opt_A) {
die "Missing package name(s)";
}
-if (@ARGV > 0 && $opt_a) {
+if (@ARGV > 0 && ($opt_a || $opt_A)) {
die "Can't specify package name(s) with -a";
}
if (@ARGV == 0) {
- @ARGV = sort(installed_packages());
+ @ARGV = sort(installed_packages(defined $opt_A ? 0 : 1));
}
for my $pkg (@ARGV) {