FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian dpkg

 
 
LinkBack Thread Tools
 
Old 10-05-2011, 11:12 AM
 
Default postinst corrupts my settings after a 'apt-get upgrade'.

Hello,

i have some problems with the package update mechanism in my appliance. I have
installed various services like 'forked-daapd'. Because i wanted to monitor and
start the daemon via 'monit' i removed the init script from the runlevels via
'update-rc.d -f forked-daapd remove'. After a 'apt-get dist-upgrade' (after
enabling Squeeze backports) i received the package from the backports. The
problem now is that it seems that the 'postinst' script has registered
the runlevels again and the process is statred via init.d script and monit now.

The following is taken from the postinst script of the forked-daapd package in
Squeeze:

# Automatically added by dh_installinit
if [ -x "/etc/init.d/forked-daapd" ]; then
update-rc.d forked-daapd defaults 25 >/dev/null
if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
invoke-rc.d forked-daapd start || exit $?
else
/etc/init.d/forked-daapd start || exit $?
fi
fi
# End automatically added section

Is it the intention of the package management to corrupt the user settings or
is this a bug?

Another szenario might be that i have installed service xyz but i have disabled
it because i did not want to use it right now. If it is updated via a package
update the default postinst behaviour is to register the init script in the
runlevels and starts the daemon/app/whatever. This is not the behaviour i
expect.

I'm thinking wrong here or is this a problem in dpkg/APT?

In my eyes the postinst script should check whether it is installed the first
time or not. When it is installed the first time the initialization is ok,
but if the package is updated the postinst script should not touch the
configuration anymore.

The forked-daapd package is just an example, the problem seems to me generic.

Regards
Volker
--
NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
Jetzt informieren: http://www.gmx.net/de/go/freephone


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111005111232.326740@gmx.net">http://lists.debian.org/20111005111232.326740@gmx.net
 
Old 10-05-2011, 11:43 AM
Jonathan Nieder
 
Default postinst corrupts my settings after a 'apt-get upgrade'.

Hi,

votdev@gmx.de wrote:

> Another szenario might be that i have installed service xyz but i have disabled
> it because i did not want to use it right now. If it is updated via a package
> update the default postinst behaviour is to register the init script in the
> runlevels and starts the daemon/app/whatever. This is not the behaviour i
> expect.
>
> I'm thinking wrong here or is this a problem in dpkg/APT?
>
> In my eyes the postinst script should check whether it is installed the first
> time or not.

This has nothing to do with dpkg or APT. It has more to do with
Debian policy[1] --- from the point of view of dpkg, each package
provides its own postinst script with whatever behavior it chooses.

There have been a few discussions of this recently[2][3][4].

Hope that helps,
Jonathan

[1] http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.3.3
[2] http://thread.gmane.org/gmane.linux.debian.devel.general/163640/focus=164342
[3] http://thread.gmane.org/gmane.linux.debian.devel.general/163640/focus=164027
[4] http://thread.gmane.org/gmane.linux.debian.devel.bugs.general/764253/focus=159724


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20111005114317.GC27187@elie">http://lists.debian.org/20111005114317.GC27187@elie
 
Old 10-05-2011, 07:06 PM
Russ Allbery
 
Default postinst corrupts my settings after a 'apt-get upgrade'.

votdev@gmx.de writes:

> i have some problems with the package update mechanism in my
> appliance. I have installed various services like
> 'forked-daapd'. Because i wanted to monitor and start the daemon via
> 'monit' i removed the init script from the runlevels via 'update-rc.d -f
> forked-daapd remove'. After a 'apt-get dist-upgrade' (after enabling
> Squeeze backports) i received the package from the backports. The
> problem now is that it seems that the 'postinst' script has registered
> the runlevels again and the process is statred via init.d script and
> monit now.

The basic problem that you're having is that this is not the correct way
to disable an init script in Debian. The correct way is to rename all the
S* links in /etc/rc?.d for that service to K* links. If you make that
change, you'll find it's preserved across upgrades and changes.

And yes, that's annoying and there's no good tool in the base installation
to handle it for you, and that's a bug that should be fixed.

--
Russ Allbery (rra@debian.org) <http://www.eyrie.org/~eagle/>


--
To UNSUBSCRIBE, email to debian-dpkg-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 8739f7b6mk.fsf@windlord.stanford.edu">http://lists.debian.org/8739f7b6mk.fsf@windlord.stanford.edu
 

Thread Tools




All times are GMT. The time now is 09:02 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org