Re: Ports with daemons on uninstall...

From: Ian FREISLICH <ianf_at_clue.co.za>
Date: Mon, 15 Jul 2013 16:23:20 +0200
Walter Hurry wrote:
> On Mon, 15 Jul 2013 08:34:05 -0500, Mark Felder wrote:
> 
> > As long as this behavior only happens during pkg installs and never with
> > ports, I'm OK. The worst is when a coworker forgets that the mysql port
> > stops the daemon and my coworker upgrades with portmaster... the daemon
> > is off the entire time mysql slowly compiles...
> 
> I'm not familiar with portmaster, since I use portupgrade. That does the 
> build first, then the deinstall old/install new. Seems a sensible 
> approach anyway, in case the build fails. Doesn't portmaster work 
> similarly?

Try doing a 'portupgrade -f isc-dhcp41-server' and watch it leave
dhcpd not running.

I eventually made the following change so that it wouldn't leave
my system in a broken state:

/usr/ports/net/isc-dhcp41-server # make clean
===>  Cleaning for isc-dhcp41-server-4.1.e_7,2
[fw2.smmt] /usr/ports/net/isc-dhcp41-server # svn diff
Index: pkg-plist
===================================================================
--- pkg-plist   (revision 323024)
+++ pkg-plist   (working copy)
_at__at_ -1,6 +1,4 _at__at_
 _at_comment $FreeBSD$
-_at_unexec %D/etc/rc.d/isc-dhcpd forcestop 2>/dev/null || true
-%%IPV6%%_at_unexec %D/etc/rc.d/isc-dhcpd6 forcestop 2>/dev/null || true
 _at_unexec if cmp -s %D/etc/dhcpd.conf.sample %D/etc/dhcpd.conf; then rm -f %D/etc/dhcpd.conf; fi
 etc/dhcpd.conf.sample
 _at_exec if [ ! -f %D/etc/dhcpd.conf ] ; then cp -p %D/%F %B/dhcpd.conf; fi

I don't mind it stopping the daemon, but if it's going to automatically
stop it, it should automatically start it too.  It's also not
consistent - random sample of two: exim and quagga just leave the
daemon running.  I'm just asking if there's a stated project guideline
for what should happen because at the moment it's hard to know what
to expect.  Maybe its as simple as an install exec that does a
'service foo start'.  If it's a first install it will fail because
foo_enable="yes" won't be set in /etc/rc.conf.

Personally, I'd rather that the package management system ports,pkg,etc
doesn't take liberties with my running daemons.  If I want to kill
them off, I'll kill them off, but there have been several times
where I've left uninstalled things running while the system was in
flux during an upgrade.  It was nice to be able to do that.

Ian

-- 
Ian Freislich
Received on Mon Jul 15 2013 - 12:23:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:39 UTC