Package: apt-cacher
Version: 1.6.4
Severity: normal

What I discoved is the apt-cacher log format has changed. Old log:

    # gzip -dc /var/log/apt-cacher/access.log.6.gz | head -1
    Thu Oct 30 22:01:39 
2008|192.168.1.12|MISS|189|security.ubuntu.com_ubuntu_dists_hardy-security_Release.gpg

New log:

    # head -1 /var/log/apt-cacher/access.log
    Tue Mar 10 01:45:59 
2009|19924|127.0.0.1|EXPIRED|189|archive.ubuntu.com_ubuntu_dists_intrepid-updates_Release.gpg

So the new format has an extra column (second column, I have no idea what it 
is) and rearranged a little.

Now edit the file
sudo nano apt-cacher-report.pl
and change this:

$req_date = $line[0];
# $req_ip = $line[1];
$req_result = $line[2];
$req_bytes = 0;
$req_bytes = $line[3] if $line[3] =~ /^[0-9]+$/;
# $req_object = $line[4];

to this:

$req_date = $line[0];
# $req_ip = $line[2];
$req_result = $line[3];
$req_bytes = 0;
$req_bytes = $line[4] if $line[4] =~ /^[0-9]+$/;
# $req_object = $line[5];

seems to work.

-- System Information:
Debian Release: 5.0.4
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-2-686 (SMP w/1 CPU core)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages apt-cacher depends on:
ii  bzip2                    1.0.5-1         high-quality block-sorting file co
ii  ed                       0.7-3           The classic unix line editor
ii  libdigest-sha1-perl      2.11-2+b1       NIST SHA-1 message digest algorith
ii  libwww-curl-perl         4.05-1          Perl bindings to libcurl
ii  libwww-perl              5.813-1         WWW client/server library for Perl
ii  perl                     5.10.0-19lenny2 Larry Wall's Practical Extraction 

Versions of packages apt-cacher recommends:
ii  libberkeleydb-perl            0.34-1+b1  use Berkeley DB 4 databases from P

Versions of packages apt-cacher suggests:
pn  libio-socket-inet6-perl       <none>     (no description available)

-- no debconf information



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to