View | Details | Raw Unified | Return to bug 21567
Collapse All | Expand All

(-)mysrc/usr.sbin/pkg_install/version/pkg_version.1 (-1 / +4 lines)
Lines 32-38 Link Here
32
.Nd summarize installed versions of packages
32
.Nd summarize installed versions of packages
33
.Sh SYNOPSIS
33
.Sh SYNOPSIS
34
.Nm pkg_version
34
.Nm pkg_version
35
.Op Fl cdhv
35
.Op Fl cdhmv
36
.Op Fl l Ar limchar
36
.Op Fl l Ar limchar
37
.Op Ar index
37
.Op Ar index
38
.Sh DESCRIPTION
38
.Sh DESCRIPTION
Lines 93-98 Link Here
93
to the shell, it is best to quote
93
to the shell, it is best to quote
94
.Ar limchar
94
.Ar limchar
95
with single quotes.
95
with single quotes.
96
.It Fl m
97
Even if multiple versions are present, report a match if the installed
98
version is among those in the INDEX.
96
.It Fl v
99
.It Fl v
97
Enable verbose output.  Verbose output includes some English-text
100
Enable verbose output.  Verbose output includes some English-text
98
interpretations of the version number comparisons, as well as the
101
interpretations of the version number comparisons, as well as the
(-)mysrc/usr.sbin/pkg_install/version/pkg_version.pl (-1 / +16 lines)
Lines 48-53 Link Here
48
$VerboseFlag = 0;
48
$VerboseFlag = 0;
49
$CommentChar = "#";
49
$CommentChar = "#";
50
$LimitFlag = "";
50
$LimitFlag = "";
51
$MultipleFlag = 0;
51
52
52
#
53
#
53
# CompareNumbers
54
# CompareNumbers
Lines 206-212 Link Here
206
#
207
#
207
# Parse command-line arguments, deal with them
208
# Parse command-line arguments, deal with them
208
#
209
#
209
if (!getopts('cdhl:v') || ($opt_h)) {
210
if (!getopts('cdhl:mv') || ($opt_h)) {
210
    &PrintHelp();
211
    &PrintHelp();
211
    exit;
212
    exit;
212
}
213
}
Lines 219-224 Link Here
219
if ($opt_l) {
220
if ($opt_l) {
220
    $LimitFlag = $opt_l;
221
    $LimitFlag = $opt_l;
221
}
222
}
223
if ($opt_m) {
224
    $MultipleFlag = 1;
225
}
222
if ($opt_v) {
226
if ($opt_v) {
223
    $VerboseFlag = 1;
227
    $VerboseFlag = 1;
224
}
228
}
Lines 309-314 Link Here
309
	    $versionCode = "*";
313
	    $versionCode = "*";
310
	    $Comment = "multiple versions (index has $indexVersion)";
314
	    $Comment = "multiple versions (index has $indexVersion)";
311
	    $Comment =~ s/\|/,/g;
315
	    $Comment =~ s/\|/,/g;
316
317
	    if ($MultipleFlag) {
318
		@iVer = split(/\|/, $indexVersion);
319
		foreach $ver (@iVer) {
320
		    if (&CompareVersions($currentVersion, $ver) == 0) {
321
			$versionCode = "=";
322
			$Comment = "up-to-date (index has $indexVersion)";
323
			$Comment =~ s/\|/,/g;
324
		    }
325
		}
326
	    }
312
	}
327
	}
313
	else {
328
	else {

Return to bug 21567