From owner-freebsd-ports@FreeBSD.ORG Thu Dec 9 05:57:46 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D68D616A4CE for ; Thu, 9 Dec 2004 05:57:46 +0000 (GMT) Received: from buexe.b-5.de (buexe.b-5.de [80.148.32.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9F83043D31 for ; Thu, 9 Dec 2004 05:57:45 +0000 (GMT) (envelope-from lupe@lupe-christoph.de) Received: from antalya.lupe-christoph.de (antalya.lupe-christoph.de [172.17.0.9])iB95vh8g030553 for ; Thu, 9 Dec 2004 06:57:44 +0100 Received: from localhost (localhost [127.0.0.1]) by antalya.lupe-christoph.de (Postfix) with ESMTP id B60F7B887 for ; Thu, 9 Dec 2004 06:26:35 +0100 (CET) Received: from antalya.lupe-christoph.de ([127.0.0.1]) by localhost (antalya [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 18858-01-19 for ; Thu, 9 Dec 2004 06:26:34 +0100 (CET) Received: by antalya.lupe-christoph.de (Postfix, from userid 1000) id 51F66B886; Thu, 9 Dec 2004 06:26:34 +0100 (CET) Date: Thu, 9 Dec 2004 06:26:34 +0100 From: Lupe Christoph To: freebsd-ports@freebsd.org Message-ID: <20041209052634.GX3113@lupe-christoph.de> References: <20041208094448.GA18514@lupe-christoph.de> <20041208214203.GA10122@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20041208214203.GA10122@xor.obsecurity.org> User-Agent: Mutt/1.5.6+20040722i X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at lupe-christoph.de Subject: Re: Mediation needed for munin-node and munin-main X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Dec 2004 05:57:47 -0000 On Wednesday, 2004-12-08 at 13:42:03 -0800, Kris Kennaway wrote: > On Wed, Dec 08, 2004 at 10:44:48AM +0100, Lupe Christoph wrote: > Why not? The usual way to handle removing "configuration items" (be > they files, or in this case symlinks) is to test whether the installed > configuration is identical to the default configuration, and only > remove them if so. The default set is determined by running munin-node-configure which loads each plugin in turn and asks it if it can autoconfigure and if it is a generic plugin (e.g. if_) about suggested suffixes. This is quite time-consuming. And it varies depending on the hardware, so if a machine is changed, the plugins may change. I would have to make a snapshot of the plugins at initial install. If the plugin list has not been changed from that, I remove it. That makes the deinstall unstable - sometimes it removes plugins sometimes it doesn't. I didn't like removing unchanged config files, and I like this much less. It violates the law of least astonishment. > For example, at install-time you'd create the symlinks if they don't > already exist (i.e. no previous installation of the package), and at > deinstall-time you'd read the destination of the symlinks, test > whether they're still pointing to the default location, and remove > them if so. Thus, if the user has changed the defaults they'll remain > untouched, but if they haven't changed them then the system will be > cleaned up. This does not work. The symlink always have the same destination. They are only added or deleted by the user. > It's an important requirement that doing 'make install deinstall' > (alternatively pkg_add; pkg_delete) leaves the system in the same > state it was before the 'install', and not leave behind random cruft > in ${PREFIX}. Well, I need at least VERSION. And the user would not like munin-main to delete all the data files that have been accumulated while the port was installed. I cannot ask the user if he wants all files deleted with a default of "yes" because many people will just blindly hit return. And if the default is "no", the automated removal will leave "cruft" behind. The only solution I see is to detect that the package is installed in a test environment and change the behaviour to remove everything. This means that the test is not realistic anymore, but will pass. You probably wont like that. Lupe Christoph -- | lupe@lupe-christoph.de | http://www.lupe-christoph.de/ | | "... putting a mail server on the Internet without filtering is like | | covering yourself with barbecue sauce and breaking into the Charity | | Home for Badgers with Rabies. Michael Lucas |