Package: apt-cacher
Version: 1.7.2
Severity: normal
Tags: patch

I've been running apt-cacher with xinetd, and made my own 
/etc/xinetd.d/apt-cacher:
service apt-cacher
{
        disable         = no
        type            = UNLISTED
        socket_type     = stream
        protocol        = tcp
        user            = www-data
        wait            = no
    server      = /usr/sbin/apt-cacher
    server_args = -i
    bind        = clementine.internal
    port        = 3142
}                                                                               

And it has been working fine, but I was having trouble connecting today, and 
looked in the log, and saw these messages:
Use of uninitialized value $xinetdconf in concatenation (.) or string at 
/usr/sbin/apt-cacher line 1995.
Warning: no apt-cacher port found in 

which it turns out have been occurring for as long as I've had it in xinetd 
mode.  They come from around line 2010.

Here is my fix.  I'm not sure what the original for loop was trying to do, but 
it appears to not have worked.  From the docs, I 
would have guessed a foreach was more appropriate, but the change below fixes 
it.  The original code doesn't search the xinetd.d directory at all.

1987c1987
<       for ($xinetdconf, glob('$xinetdconfdir/*')) {
---
>         for (glob("$xinetdconf $xinetdconfdir/*")) {


And then this is just a documentation change to make it clearer that it is 
(now) appropriately looking in the xinetd.d directory.
2010c2010
<       info_message("Warning: no apt-cacher port found in $xinetdconf") if 
!$found;
---
>         info_message("Warning: no apt-cacher port found in $xinetdconfdir or 
> $xinetdconf") if !$found;


Lastly, I thought about changing the for line to:
for (glob("$xinetdconf $xinetdconfdir/[a-z-]*")) {

which would ignore an apt-cacher~ file, but perhaps that isn't necessary since 
the loop exits out as soon as it finds a match.


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.1.0-1-686-pae (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apt-cacher depends on:
ii  debconf [debconf-2.0]  1.5.41      
ii  dpkg                   1.16.1.2    
ii  ed                     1.5-3       
ii  libfilesys-df-perl     0.92-4+b1   
ii  libfreezethaw-perl     0.5001-1    
ii  libio-interface-perl   1.06-1+b1   
ii  libnetaddr-ip-perl     4.058+dfsg-1
ii  libwww-curl-perl       4.15-1+b2   
ii  libwww-perl            6.03-1      
ii  lsb-base               3.2-28      
ii  perl                   5.14.2-6    
ii  update-inetd           4.41        

Versions of packages apt-cacher recommends:
ii  libberkeleydb-perl  0.49-1

Versions of packages apt-cacher suggests:
ii  libio-socket-inet6-perl  2.65-1.1

-- debconf information:
* apt-cacher/mode: inetd



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to