[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Re: Standards 4.1.3 and apt-cacher



> 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
>   db_get apt-cacher/mode
>   case "$RET" in
>     daemon)
>       update_rc_args="apt-cacher defaults"
>       ;;
>     inetd)
>     manual)
>       update_rc_args="apt-cacher defaults-disabled"
>       ;;
>   esac
> fi

> if [ $1 = reconfigure ] ; then
>   db_get apt-cacher/mode
>   case "$RET" in
>     daemon)
>       update_rc_args="apt-cacher enable"
>       ;;
>     inetd)
>       update_rc_args="apt-cacher disable"
>       ;;
>     manual)
>       update_rc_args="" #do nothing
>       ;;
>   esac
> fi

> if [ -n "$update_rc_args" ] ; then
>   update-rc.d $update_rc_args
> fi

Felipe,

Many thanks for this. Your point is well made and I have now got a working
version that lintian doesn't complain about.

However, in trying to understand more fully when postinst is called with
configure and reconfigure arguments, it appears that reconfigure is not
currently supported at all. It is not mentioned in the Policy and ancient bug
#215549 was closed as wontfix. So although reconfigure is in the postinst
skeleton the distinction is not observed. The only possible way to distinguish
is using the hack that DEBCONF_RECONFIGURE=1 is set in the postinst
environment. See debconf-devel(7).

Or am I missing something?

Mark


Reply to: