Package: apt-cacher-ng
Version: 0.2.2-2
Severity: important
Tags: patch

If you changed BindAddress to add the 1.2.3.4 IP to /etc/apt-cacher-ng/acng.conf
apt-cacher 0.2.2-2 breaks on crontab with the following error:

  /etc/cron.daily/apt-cacher-ng:
  Cannot connect, no alternative (socket file) available
  no such host: localhost1.2.3.4
  run-parts: /etc/cron.daily/apt-cacher-ng exited with return code 255

So, it concatenates addresses instead of picking one.

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

Kernel: Linux 2.6.24-7-pve (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=C (charmap=UTF-8) (ignored: LC_ALL set to 
fr_FR.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages apt-cacher-ng depends on:
ii  adduser                3.110             add and remove users and groups
ii  libbz2-1.0             1.0.5-1           high-quality block-sorting file co
ii  libc6                  2.7-18            GNU C Library: Shared libraries
ii  libfuse2               2.7.4-1.1         Filesystem in USErspace library
ii  libgcc1                1:4.3.2-1.1       GCC support library
ii  libstdc++6             4.3.2-1.1         The GNU Standard C++ Library v3
ii  zlib1g                 1:1.2.3.3.dfsg-12 compression library - runtime

apt-cacher-ng recommends no packages.

apt-cacher-ng suggests no packages.

-- no debconf information
## apt-cacher-ng cron bug fix
#
# If you changed BindAddress to add the 1.2.3.4 IP to 
/etc/apt-cacher-ng/acng.conf
# apt-cacher 0.2.2-2 breaks on crontab with the following error:
#
/etc/cron.daily/apt-cacher-ng:
Cannot connect, no alternative (socket file) available
no such host: localhost1.2.3.4
run-parts: /etc/cron.daily/apt-cacher-ng exited with return code 255
#
#
# Here is the fix:
#
## /usr/lib/apt-cacher-ng/expire-caller.pl
--- /usr/lib/apt-cacher-ng/expire-caller.pl~    2009-11-05 23:05:42.000000000 
+0000
+++ /usr/lib/apt-cacher-ng/expire-caller.pl     2009-11-05 23:08:05.000000000 
+0000
@@ -46,7 +46,7 @@
 elsif($cfg{bindaddress})
 {
    $cfg{remotehost}=$cfg{bindaddress};
-   $cfg{remotehost}=~s/^\s*(\S+)\s*/$1/;
+   $cfg{remotehost}=~s/\s*(\S+)\s*.*/$1/; # only keep the first host
 }
 else
 {

Reply via email to