From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Dec 14 21:20:34 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B972616A4CE for ; Tue, 14 Dec 2004 21:20:34 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CA7843D45 for ; Tue, 14 Dec 2004 21:20:34 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.1/8.13.1) with ESMTP id iBELKYHF064506 for ; Tue, 14 Dec 2004 21:20:34 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.1/8.13.1/Submit) id iBELKXc5064505; Tue, 14 Dec 2004 21:20:33 GMT (envelope-from gnats) Date: Tue, 14 Dec 2004 21:20:33 GMT Message-Id: <200412142120.iBELKXc5064505@freefall.freebsd.org> To: freebsd-ports-bugs@FreeBSD.org From: Paul Chvostek Subject: Re: ports/75018: [maintainer update]: net-mgmt/rotorouter was missing a file from its plist... X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Paul Chvostek List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2004 21:20:34 -0000 The following reply was made to PR ports/75018; it has been noted by GNATS. From: Paul Chvostek To: Sergey Matveychuk Cc: freebsd-gnats-submit@FreeBSD.org, ports@FreeBSD.org Subject: Re: ports/75018: [maintainer update]: net-mgmt/rotorouter was missing a file from its plist... Date: Tue, 14 Dec 2004 16:15:28 -0500 --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Dec 14, 2004 at 05:15:06AM +0300, Sergey Matveychuk wrote: > > I don't think it's a good idea to remove conf file this way. > > Use something like this instead: > @unexec if cmp -s %D/etc/rotorouter.conf %D/etc/rotorouter.conf-example; > then rm -f %D/etc/rotorouter.conf; fi Agreed, that's more consistent with what other ports are doing. I've attached a replacement diff against the original port. But ... While this is indeed consistent with how other ports work, it brings up a philosophical question. Should port behaviour upon uninstall be controlled by the port, or by the ports system itself? By simply including the conf file in the +CONTENTS, without this @unexec, a `pkg_delete` will remove the package but leave an altered conf file, while `make deinstall` will remove the conf file as well. Both will display a warning about the MD5 not matching, and neither will return an error, whatever happens. Could this be improved? I think so. (I'm CCing ports@ for discussion.) So ... we have a "convention" amongst other ports of comparing config files against their "-dist" or "-example" counterparts. Should this behaviour be made standard? Perhaps a variable in the Makefile (i.e. SAVEFILES or DO_NOT_DELETE) that contains a list of prefix-less files that should kept rather than deleted if their MD5 is wrong? For basic implementation of this, we wouldn't need to change the pkg_* tools; the existence of the file in the variable could cause bsd.port.mk to generate exactly the @unexec you've recommended above. Unless of course we wanted some kind of override option that would let us say "ya, delete the bugger, I don't care." Is there any merit to any of this, or should folks installing ports just be able to clean up after themselves? p -- Paul Chvostek Operations / Abuse / Whatever it.canada, hosting and development http://www.it.ca/ --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rotorouter-1.0_1.diff-2" diff -ruN /usr/ports/net-mgmt/rotorouter/pkg-plist rotorouter/pkg-plist --- /usr/ports/net-mgmt/rotorouter/pkg-plist Mon Jun 14 13:56:41 2004 +++ rotorouter/pkg-plist Tue Dec 14 16:11:03 2004 @@ -1,3 +1,4 @@ sbin/rotorouter etc/rc.d/rotorouter.sh etc/rotorouter.conf-example +@unexec if cmp -s %D/etc/rotorouter.conf %D/etc/rotorouter.conf-example; then rm -f %D/etc/rotorouter.conf; fi --FL5UXtIhxfXey3p5--