Package: apt-cacher-ng Version: 0.3.1-1 Severity: grave Justification: renders package unusable
When starting/restarting apt-cacher-ng from init script, it refuses to start:
---8<---
# invoke-rc.d apt-cacher-ng start
Starting apt-cacher-ng: apt-cacher-ngUsage: apt-cacher -h -c configdir
<var=value ...>
Options:
-h: this help message
-c configuration directory
-e: run expiration on startup
Most interesting variables:
Daemon: 1 Daemonize program
PidFile: /path/to/pidfile File to store daemon's PID
FifoPath: /path/to/fifofile FIFO file, for control and local communication
CacheDir: /directory/for/storage
LogDir: /directory/for/logfiles
See manpage for all directives.
.
---8<---
With "sh -x /etc/init.d/apt-cacher-ng start", the invoked command line
appears to be:
---8<---
+ start-stop-daemon --start --chuid apt-cacher-ng --group apt-cacher-ng --quiet
--pidfile /var/run/apt-cacher-ng/pid --exec /usr/sbin/apt-cacher-ng -- -c
/etc/apt-cacher-ng pidfile=/var/run/apt-cacher-ng/pid
SocketPath=/var/run/apt-cacher-ng/socket foreground=0
---8<---
If I edit /etc/init.d/apt-cacher-ng by removing "foreground=0" from
DAEMON_OPTS, the service can start again.
apt-cacher-ng 0.3.1 seems to refuse integer argument of zero value.
In acfg.cc, function SetOption():
---8<---
...
else if ( NULL != (nTarget = _GetIntPtr(key)))
{
*nTarget=atoi(value.c_str());
if(0==*nTarget)
{
if(value.length()<1)
cerr << "Unexpected empty value for " << key <<
", check the configuration!"<<endl;
else if(!isdigit((UINT) value[0]))
cerr << "Invalid value for " << key << ",
expected a number!"<<endl;
return false;
}
}
...
---8<---
So, if atoi returns 0, despite being a valid value, it's always treated as
error.
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.26-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=th_TH.UTF-8, LC_CTYPE=th_TH.UTF-8 (charmap=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-14 GNU C Library: Shared libraries
ii libfuse2 2.7.4-1.1 Filesystem in USErspace library
ii libgcc1 1:4.3.2-1 GCC support library
ii libstdc++6 4.3.2-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
--
Theppitak Karoonboonyanan
http://linux.thai.net/~thep/
signature.asc
Description: Digital signature

