diff --git a/doc/pkg-get.8 b/doc/pkg-get.8 index 1ec46a0..1f8cd58 100644 --- a/doc/pkg-get.8 +++ b/doc/pkg-get.8 @@ -1,5 +1,5 @@ ." Text automatically generated by txt2man-1.4.7 -.TH pkg-get 8 "April 23, 2006" "" "" +.TH pkg-get 8 "July 13, 2006" "" "" .SH NAME \fBpkg-get \fP- a package management tool for CRUX Linux \fB @@ -29,8 +29,8 @@ Update given packages, download if necessary. .TP .B -diff -Show a list of outdated packages. +diff [\fB--all\fP] +Show a list of outdated packages. The \fB--all\fP option also displays locked packages. .TP .B quickdiff diff --git a/doc/pkg-get.8.txt b/doc/pkg-get.8.txt index aee645a..99a9d36 100644 --- a/doc/pkg-get.8.txt +++ b/doc/pkg-get.8.txt @@ -17,7 +17,7 @@ COMMANDS download if necessary. update [..] Update given packages, download if necessary. - diff Show a list of outdated packages. + diff [--all] Show a list of outdated packages. The --all option also displays locked packages. quickdiff Show a compact list of outdated packages. sysup Update all outdated packages. Download if necessary. depinst [..] Install given packages diff --git a/scripts/pkg-get.pl b/scripts/pkg-get.pl index 5fe394f..5ab5796 100755 --- a/scripts/pkg-get.pl +++ b/scripts/pkg-get.pl @@ -936,13 +936,22 @@ sub diff { %pkg = parsepackage($_, $dir, $url, 1); if (not $found{$pkg{'name'}}) { if ($pkg{'instversion'}) { - if ($pkg{'instversion'} ne $pkg{'version'}."-".$pkg{'release'} and (islocked($pkg{'name'}) eq "no")) { + if ($pkg{'instversion'} ne $pkg{'version'}."-".$pkg{'release'}) { + if (islocked($pkg{'name'}) eq "no") { if ($gotdiff == 0){ print "Differences between installed packages and packages repo:\n\n"; printf("%-19s %-19s %-19s\n\n","Package","Installed","Available in the repositories"); $gotdiff = 1; } - printf("%-19s %-19s %-19s\n", $pkg{'name'}, $pkg{'instversion'}, $pkg{'version'}."-".$pkg{'release'}); + printf("%-19s %-19s %-19s %-19s\n", $pkg{'name'}, $pkg{'instversion'}, $pkg{'version'}."-".$pkg{'release'}); + } elsif ($all) { # yeah, it blows, at least avoid to read the locked state twice. + if ($gotdiff == 0){ + print "Differences between installed packages and packages repo:\n\n"; + printf("%-19s %-19s %-19s\n\n","Package","Installed","Available in the repositories"); + $gotdiff = 1; + } + printf("%-19s %-19s %-19s %-19s\n", $pkg{'name'}, $pkg{'instversion'}, $pkg{'version'}."-".$pkg{'release'}, "locked"); + } } } $found{$pkg{'name'}} = 1;