Package: libapt-pkg-perl
Version: 0.1.28
Severity: normal
File: /usr/lib/perl5/AptPkg/Cache.pm

Program foo.pl below prints

    Size=undef

where I hoped it would be the size of the apt .deb.

The Size and InstalledSize fields from a package "Version" object seem
to have been lost in this change,

    
http://anonscm.debian.org/gitweb/?p=users/bod/libapt-pkg-perl.git;a=commitdiff;h=03ae8d187f3081ebfbd05a2412d187a09d349d15

Was that intentional?  Size and InstalledSize are still in the
AptPkg::Cache pod.

use 5.010;
use strict;
use warnings;
use AptPkg::Cache;

my $name = 'apt';

my $cache = AptPkg::Cache->new;
my $pkgrecords = $cache->packages;
my $p = $cache->{$name} || die "don't know anything about package: $name\n";
my $verlist = $p->{VersionList} || die "no versions of: $name";
my $ver = $verlist->[0];
my $size = $ver->{Size};
print "Size=",$size//'undef',"\n";
print "\nKeys:\n",join("\n",keys %$ver),"\n";
--- Cache.pm	2013-06-18 07:16:02.000000000 +1000
+++ Cache.pm.orig	2013-05-11 00:41:52.000000000 +1000
@@ -139,7 +139,7 @@
 our @KEYS = qw(
     VerStr Section Arch MultiArch ParentPkg DescriptionList
     TranslatedDescription DependsList ProvidesList FileList Index
-    Priority Size InstalledSize
+    Priority
 );
 
 sub ParentPkg


-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-486
Locale: LANG=en_AU, LC_CTYPE=en_AU (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/dash

Versions of packages libapt-pkg-perl depends on:
ii  libapt-pkg4.12              0.9.7.9
ii  libc6                       2.13-10
ii  libgcc1                     1:4.6.1-3
ii  libstdc++6                  4.6.1-3
ii  perl-base [perlapi-5.14.2]  5.14.2-21

libapt-pkg-perl recommends no packages.

libapt-pkg-perl suggests no packages.

-- no debconf information

Reply via email to