summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSimone Rota <simone@sip.local>2006-07-13 04:59:42 +0200
committerSimone Rota <simone@sip.local>2006-07-13 04:59:42 +0200
commit2570da93a052b866ea67a8407a8c2672defe28e9 (patch)
tree7f47c5a3d185a6ec79787d6fbfb74a8b454bdf8c /scripts
parentb1b1753243b1f3488b1aa10646b5fa2c0a05983c (diff)
downloadpkg-get-2570da93a052b866ea67a8407a8c2672defe28e9.tar.gz
pkg-get-2570da93a052b866ea67a8407a8c2672defe28e9.tar.xz
Addedd --all switch for diff command
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/pkg-get.pl13
1 files changed, 11 insertions, 2 deletions
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;

Generated by cgit