From owner-freebsd-ports@FreeBSD.ORG Fri Dec 9 21:25:25 2011 Return-Path: Delivered-To: freebsd-ports@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id E4A54106564A; Fri, 9 Dec 2011 21:25:25 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 898A3152F6E; Fri, 9 Dec 2011 21:25:25 +0000 (UTC) Message-ID: <4EE27CC5.4010006@FreeBSD.org> Date: Fri, 09 Dec 2011 13:25:25 -0800 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111110 Thunderbird/8.0 MIME-Version: 1.0 To: Baptiste Daroussin References: <4ED8C0F1.807@FreeBSD.org> <20111202195555.GD1913@azathoth.lan> <4ED95A95.9040805@FreeBSD.org> <20111209211848.GF59666@azathoth.lan> In-Reply-To: <20111209211848.GF59666@azathoth.lan> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: FreeBSD Ports ML , Andriy Gapon Subject: Re: again, ports that stop daemons X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2011 21:25:26 -0000 On 12/09/2011 13:18, Baptiste Daroussin wrote: > On Sat, Dec 03, 2011 at 01:09:09AM +0200, Andriy Gapon wrote: >> on 02/12/2011 21:55 Baptiste Daroussin said the following: >>> On Fri, Dec 02, 2011 at 08:38:05PM +0100, Torfinn Ingolfsen wrote: >>>> On Fri, Dec 2, 2011 at 1:13 PM, Andriy Gapon wrote: >>>>> >>>>> Or that they simply quit doing that and instead print a message like "Port X is >>>>> deinstalled but it may have some processes running, please do Y and/or Z to find >>>>> them and/or stop them". >>>> >>>> I prefer this suggestion. >>> >>> I also would prefer this. >> >> >> BTW, this part of my suggestion was inspired by the following: >> http://en.opensuse.org/SDB:Zypper_usage_11.3#Check_processes >> >> Not sure how that feature is implemented though. >> > FYI, since a few minutes, pkgng handle rc scripts, disabled by default because I > still consider this feature dangerous. > to activate it is: > HANDLE_RC_SCRIPTS=yes in pkg.conf I previously described what I thought was a pretty good way to handle this question that addressed the needs expressed by all of the posters on the previous thread, but my suggestion didn't get any responses. Since this has come up again, it would be helpful (to me at least) if people would think about my idea, and if nothing else tell me why I'm wrong. :) Quoting: Speaking only for myself I hate the idea of stopping/starting services automatically. However this feature is often requested, and is something that is provided by many other package systems. If we have people who are willing to do the work I think it's worth discussing how to do it properly. The way that I envision it working would be a 3-knob system. One knob to always restart the services, one to never do it; and then asking on a per-port basis, which should be the default. I can imagine portmaster detecting this option in the pre-build phase similarly to how it detects and warns about IS_INTERACTIVE now, and giving the user a menu of options for how to handle it. I'm happy to add more details if people are interested. Where this actually becomes interesting is not in the ports build/install process, which is pretty easy to deal with, but with package installs/deinstalls. I definitely think it's doable, what we probably want to do is put a knob for this in the port's Makefile, and handle the stop/start for both the port and the package with a little script that can be included in the package, and run with @exec and @unexec. -- [^L] Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/