[Pkg-asv-commits] r47 - in trunk: . debian
Andreas Hoenen
ahoenen-guest at alioth.debian.org
Sat Jun 13 09:42:15 UTC 2009
Author: ahoenen-guest
Date: 2009-06-13 09:42:13 +0000 (Sat, 13 Jun 2009)
New Revision: 47
Modified:
trunk/apt-show-versions
trunk/apt-show-versions.bash_completion
trunk/debian/changelog
Log:
* Fix function name in bash completion file in order to become POSIX
compliant and to work for Bash 2. Thanks to Emilio Pozuelo Monfort for
reporting and the patch. (Closes: #531608)
* Change version variables' names in a-s-v script, thus ExtUtils::MakeMaker
succeeds in version extraction.
Modified: trunk/apt-show-versions
===================================================================
--- trunk/apt-show-versions 2009-05-19 19:36:11 UTC (rev 46)
+++ trunk/apt-show-versions 2009-06-13 09:42:13 UTC (rev 47)
@@ -52,8 +52,9 @@
my $cache = AptPkg::Cache->new;
my $policy = $cache->policy;
-my $ASV_VERSION;
-$ASV_VERSION ='0.16';
+my $VERSION;
+# Used by ExtUtils::MakeMaker:
+$VERSION ='0.16';
# Provide some constants (to avoid redundant literals).
my $ARCHIVE = 'Archive';
@@ -64,7 +65,7 @@
my $STATUS = 'Status';
my $SUITE = 'Suite';
my $UNKNOWN = 'unknown';
-my $VERSION = 'Version';
+my $VERS = 'Version';
# process commandline parameters
my %opts;
@@ -122,7 +123,7 @@
if (exists $opts{'help'}) {
print <<EOF;
-Apt-Show-Versions v.$ASV_VERSION (c) Christoph Martin
+Apt-Show-Versions v.$VERSION (c) Christoph Martin
Usage:
apt-show-versions shows available versions of installed packages.
@@ -343,7 +344,7 @@
push @print_info, "$ipackages->{$package}->{$PACKAGE} ";
unless ($ipackages->{$package}->{$STATUS} =~ /not-installed/ ||
$ipackages->{$package}->{$STATUS} =~ /config-files/) {
- push @print_info, "$ipackages->{$package}->{$VERSION} ";
+ push @print_info, "$ipackages->{$package}->{$VERS} ";
}
push @print_info, "$ipackages->{$package}->{$STATUS}\n";
} else {
@@ -371,11 +372,11 @@
# Then handle current release.
(my $archive = $pkg->{$RELEASE}) =~ s/_.*//;
push @print_info, {$PACKAGE => $pkg->{$PACKAGE},
- $VERSION => $pkg->{$VERSION},
+ $VERS => $pkg->{$VERS},
$NAME => &get_rel_name($pkg->{$RELEASE}),
$ARCHIVE => $archive};
$max_package_len = &max(length($pkg->{$PACKAGE}), $max_package_len);
- $max_version_len = &max(length($pkg->{$VERSION}), $max_version_len);
+ $max_version_len = &max(length($pkg->{$VERS}), $max_version_len);
$max_name_len = &max(length(&get_rel_name($pkg->{$RELEASE})),
$max_name_len);
}
@@ -387,11 +388,11 @@
}
}
- my $iversion = $ipackages->{$package}->{$VERSION};
+ my $iversion = $ipackages->{$package}->{$VERS};
# print info about upgrade status (only if package is installed)
- if (($ipackages->{$package}->{$VERSION}) &&
+ if (($ipackages->{$package}->{$VERS}) &&
(!($ipackages->{$package}->{$STATUS} =~ /config-files/))) {
# Reorder package version structures to prefer the default release.
@pkg_releases = &reorder_pkg_releases(@pkg_releases);
@@ -402,7 +403,7 @@
$cand = $policy->candidate($cache->{$package});
}
foreach (@pkg_releases) {
- my $version = $_->{$VERSION};
+ my $version = $_->{$VERS};
if ($version) {
my @version_info;
($found, @version_info) =
@@ -419,7 +420,7 @@
# than all available versions.
my $newer_indic = 1;
foreach (@pkg_releases) {
- my $cmp_version = $_->{$VERSION};
+ my $cmp_version = $_->{$VERS};
if ($cmp_version and
$vs->compare($iversion, $cmp_version) <= 0)
{
@@ -441,7 +442,7 @@
# the policy, the upgrade can only be executed manually.
if ($cand and $iversion eq $cand->{VerStr}) {
foreach my $release (@pkg_releases) {
- my $cmp_version = $release->{$VERSION};
+ my $cmp_version = $release->{$VERS};
if ($cmp_version and
$vs->compare($iversion, $cmp_version) < 0)
{
@@ -483,7 +484,7 @@
if (ref $print_info) {
printf("%*s %*s %*s %s\n",
-$max_package_len, $print_info->{$PACKAGE},
- -$max_version_len, $print_info->{$VERSION},
+ -$max_version_len, $print_info->{$VERS},
-$max_name_len, $print_info->{$NAME},
$print_info->{$ARCHIVE});
}
@@ -526,8 +527,8 @@
}
else {
if (!defined $packages->{$package->{$PACKAGE}} or
- $vs->compare($packages->{$package->{$PACKAGE}}{$VERSION},
- $package->{$VERSION}) < 0) {
+ $vs->compare($packages->{$package->{$PACKAGE}}{$VERS},
+ $package->{$VERS}) < 0) {
$package->{$RELEASE} = $release;
$packages->{$package->{$PACKAGE}} = $package;
}
@@ -672,8 +673,7 @@
my $rel_key = $releases[$idx]->{$RELEASE};
if (defined $move_idx) {
# There exists a move candidate.
- if ($releases[$idx]->{$VERSION} eq
- $releases[$move_idx]->{$VERSION}) {
+ if ($releases[$idx]->{$VERS} eq $releases[$move_idx]->{$VERS}) {
# Current release is of same version as move candidate.
if (&get_rel_suite($rel_key) eq $default_release
or &get_rel_codename($rel_key) eq $default_release) {
@@ -709,7 +709,7 @@
# 3) Release name
################################################################################
sub sort_pkg_releases {
- my $cmp_versions = $vs->compare($a->{$VERSION}, $b->{$VERSION});
+ my $cmp_versions = $vs->compare($a->{$VERS}, $b->{$VERS});
return $cmp_versions if ($cmp_versions);
my $cmp_suites = (&suite_idx(&get_rel_suite($a->{$RELEASE})) <=>
&suite_idx(&get_rel_suite($b->{$RELEASE})));
Modified: trunk/apt-show-versions.bash_completion
===================================================================
--- trunk/apt-show-versions.bash_completion 2009-05-19 19:36:11 UTC (rev 46)
+++ trunk/apt-show-versions.bash_completion 2009-06-13 09:42:13 UTC (rev 47)
@@ -1,7 +1,7 @@
#-*-shell-script-*-
have apt-show-versions &&
-_apt-show-versions()
+_apt_show_versions()
{
local cur prev opts
@@ -48,4 +48,4 @@
return 0
fi
}
-complete -F _apt-show-versions -o filenames apt-show-versions
+complete -F _apt_show_versions -o filenames apt-show-versions
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-05-19 19:36:11 UTC (rev 46)
+++ trunk/debian/changelog 2009-06-13 09:42:13 UTC (rev 47)
@@ -5,10 +5,15 @@
John V. Belmonte and Anders Boström for reporting. (Closes: #515328)
* Fix manpage encoding: create UTF-8 manpages for all supported languages.
Thanks to Vincent Danjean for reporting and the patch. (Closes: #524577)
+ * Fix function name in bash completion file in order to become POSIX
+ compliant and to work for Bash 2. Thanks to Emilio Pozuelo Monfort for
+ reporting and the patch. (Closes: #531608)
+ * Change version variables' names in a-s-v script, thus ExtUtils::MakeMaker
+ succeeds in version extraction.
* debian/control:
Upgrade Standards-Version: 3.8.1 (no changes needed)
- -- Andreas Hoenen <andreas at hoenen-terstappen.de> Tue, 19 May 2009 21:15:37 +0200
+ -- Andreas Hoenen <andreas at hoenen-terstappen.de> Sat, 13 Jun 2009 11:35:25 +0200
apt-show-versions (0.15) unstable; urgency=low
More information about the Pkg-asv-commits
mailing list