Re: Standards 4.1.3 and apt-cacher
- Date: Wed, 7 Feb 2018 13:00:40 +0000 (UTC)
- From: Felipe Sateler <fsateler@xxxxxxxxxx>
- Subject: Re: Standards 4.1.3 and apt-cacher
On Wed, 07 Feb 2018 10:14:15 +0000, Mark Hindley wrote:
> I am trying to upgrade apt-cacher to Standards version 4.1.3. In
> particular using DISABLED=yes|no in /etc/defaults is now prohibited.
Thanks for fixing this.
> apt-cacher can be run as a daemon or from /etc/inetd.conf and this
> configuration is set in response to a debconf question.
> I have a working version of the postinst which I believe complies with
> the new policy by no longer changing a value in /etc/default/apt-cacher,
> however it contains multiple calls to update-rc.d (one to register the
> init file and then calls to enable/disable as appropriate in response to
> db_get). This produces the lintian error:
> Is my approach flawed or is lintian being overzealous?
It is a bit overzealous, but I think you have another problem. Your
package will override local admin on upgrades (if they changed the config
manually) by calling update-rc.d and update-inetd. I think you need to
change it to not do so. I don't know much about update-inetd but the
pattern for update-rc.d should be something like this:
if [ $1 = configure ] || [ $1 == abort-upgrade ] ; then
case "$RET" in
if [ $1 = reconfigure ] ; then
case "$RET" in
update_rc_args="" #do nothing
if [ -n "$update_rc_args" ] ; then
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ]; then
if [ -x "/etc/init.d/apt-cacher" ]; then
invoke-rc.d apt-cacher start || exit $?
PS: you might want to take a look at the socket-activation features of
systemd. You could have systemd-systems be always socket-activated. One
might even think of removing the standalone daemon mode....