[Pkg-asv-commits] r72 - in trunk: . debian
Christoph Martin
chrism at moszumanska.debian.org
Mon Oct 13 13:23:11 UTC 2014
Author: chrism
Date: 2014-10-13 13:23:11 +0000 (Mon, 13 Oct 2014)
New Revision: 72
Modified:
trunk/apt-show-versions
trunk/debian/changelog
Log:
* fix not showing available versions if pkg not installed (thanks to
Ross Vandegrift <ross at kallisti.us>) (closes: #725107, #715314)
* fix sorting of versions for correct output of current version (thanks
to debianuser01 at free.fr )(closes: #730338, #613965)
* add --version option (closes: #725963)
Modified: trunk/apt-show-versions
===================================================================
--- trunk/apt-show-versions 2014-08-28 16:12:27 UTC (rev 71)
+++ trunk/apt-show-versions 2014-10-13 13:23:11 UTC (rev 72)
@@ -11,7 +11,7 @@
# Author: Christoph Martin <martin at uni-mainz.de>
# Maintainer: Christoph Martin <martin at uni-mainz.de>
-# Version: 0.22.4
+# Version: 0.22.5
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
@@ -54,7 +54,7 @@
my $VERSION;
# Used by ExtUtils::MakeMaker:
-$VERSION ='0.22.4';
+$VERSION ='0.22.5';
# Provide some constants (to avoid redundant literals).
my $ARCHIVE = 'Archive';
@@ -85,6 +85,7 @@
'nohold|nh',
'initialize|i',
'verbose|v',
+ 'version|V',
'help|h')) {
exit 1;
}
@@ -122,6 +123,11 @@
$mode = $MODE_ALL;
}
+if ($opts{'version'}) {
+ print "Apt-Show-Versions v.$VERSION (c) Christoph Martin\n";
+ exit;
+}
+
if (exists $opts{'help'}) {
print <<EOF;
Apt-Show-Versions v.$VERSION (c) Christoph Martin
@@ -143,6 +149,7 @@
-nh|--nohold Don't treat holded packages.
-i|--initialize Initialize or update package cache only (as root).
-v|--verbose Verbose messages.
+ -V|--version Prints apt-show-versions version
-h|--help Print this help.
EOF
exit;
@@ -342,18 +349,18 @@
printf("%s not available for architecture %s\n", $pkgname, $archname);
} elsif (! defined $pkgs->{$pkgname}) {
if ($mode != $MODE_SINGLE || $archname) {
- printf("%s not installed\n", $package);
+ print_package_internal($pkgname, $archname)
} elsif (keys(%{$apackages->{$pkgname}})) {
my $archlist = "";
foreach my $a (sort keys(%{$apackages->{$pkgname}})) {
+ print_package_internal($pkgname, $a);
$archlist .= ($archlist ? ", $a" : "$a");
}
- printf("%s not installed (available for: %s)\n", $pkgname, $archlist);
} else {
printf("%s not installed (not available)\n", $pkgname);
}
} else {
- foreach my $arch ($archname or sort keys %{$pkgs->{$pkgname}}) {
+ foreach my $arch ($archname or sort keys(%{$apackages->{$pkgname}})) {
print_package_internal($pkgname, $arch);
}
}
@@ -387,8 +394,6 @@
push @print_info, "$ipkg->{$VERS} ";
}
push @print_info, "$ipkg->{$STATUS}\n";
- } else {
- push @print_info, "Not installed\n";
}
# Index to @official_suites: Next official suite to mention if missing.
@@ -443,12 +448,19 @@
if ($cache->{$pkgarch}) {
$cand = $policy->candidate($cache->{$pkgarch});
}
+ my $irelease; # first release associated with $iversion in reorder_pkg_releases() order.
+ foreach (@pkg_releases) {
+ if ( $_->{$VERS} eq $iversion ) {
+ $irelease = &get_rel_name($_->{$RELEASE});
+ last;
+ }
+ }
foreach (@pkg_releases) {
my $version = $_->{$VERS};
if ($version) {
my @version_info;
($found, @version_info) =
- &print_version(&get_rel_name($_->{$RELEASE}),
+ &print_version($irelease,
$pkgarch, $iversion, $version, $cand);
push @print_info, @version_info if ($found);
$aversion = $version;
@@ -863,8 +875,12 @@
=item B<-v>, B<--verbose>
-Prints out messages about which Package files are parsed.
+Prints out messages about which package files are parsed.
+=item B<-V>, B<--version>
+
+Prints out version of apt-show-versions
+
=item B<-i>, B<--initialize>
Initialize or update package cache only (as root). Do this every time
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2014-08-28 16:12:27 UTC (rev 71)
+++ trunk/debian/changelog 2014-10-13 13:23:11 UTC (rev 72)
@@ -1,3 +1,13 @@
+apt-show-versions (0.22.5) unstable; urgency=low
+
+ * fix not showing available versions if pkg not installed (thanks to
+ Ross Vandegrift <ross at kallisti.us>) (closes: #725107, #715314)
+ * fix sorting of versions for correct output of current version (thanks
+ to debianuser01 at free.fr )(closes: #730338, #613965)
+ * add --version option (closes: #725963)
+
+ -- Christoph Martin <christoph.martin at uni-mainz.de> Mon, 13 Oct 2014 14:58:30 +0200
+
apt-show-versions (0.22.4) unstable; urgency=medium
[ Christoph Martin ]
More information about the Pkg-asv-commits
mailing list