Package: libapt-pkg-perl
Version: 0.1.26+b1
Severity: normal
Tags: l10n
Hello,
On a fresh installation of wheezy (netinst RC1 on amd64), when I ask
this Perl module to get a package's long description, it gets the short
description instead:
$ cat bothdescs.pl
#!/usr/bin/perl
use strict;
use warnings;
use AptPkg::Cache;
use AptPkg::PkgRecords;
my $cache = AptPkg::Cache->new;
my $pkgrecords = $cache->packages;
my $pkgname = $ARGV[0]
or die "Usage: $0 <pkgname>\n";
my $pkgrec = $pkgrecords->lookup($pkgname)
or die "Failed to get pkg record for $pkgname\n";
print "Short desc: $pkgrec->{ShortDesc}\n";
print "Long desc: $pkgrec->{LongDesc}\n";
$ ./bothdescs.pl frog
Short desc: tagger and parser for Dutch language
Long desc: tagger and parser for Dutch language
$
I suspect this is because long descriptions are no longer kept in the
"Packages" files under "Description", but stored separately in the
"Translations" files under e.g. "Description-en".
The command "apt-cache show frog" retrieves the long description
correctly, and the apt-cache source code shows a call to
TranslatedDescription() - perhaps libapt-pkg-perl should be modified
to do something similar.
Many thanks.
-- System Information:
Debian Release: 7.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 3.2.0-4-amd64 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash
Versions of packages libapt-pkg-perl depends on:
ii libapt-pkg4.12 0.9.7.7
ii libc6 2.13-38
ii libgcc1 1:4.7.2-5
ii libstdc++6 4.7.2-5
ii perl-base [perlapi-5.14.2] 5.14.2-18
libapt-pkg-perl recommends no packages.
libapt-pkg-perl suggests no packages.
-- no debconf information
--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org