From owner-freebsd-ports@FreeBSD.ORG Sat Jan 28 21:51:43 2006 Return-Path: X-Original-To: ports@freebsd.org 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 E479C16A420; Sat, 28 Jan 2006 21:51:43 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from elvis.mu.org (elvis.mu.org [192.203.228.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id A168643D45; Sat, 28 Jan 2006 21:51:43 +0000 (GMT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (elvis.mu.org [192.203.228.196]) by elvis.mu.org (Postfix) with ESMTP id 883301A3C29; Sat, 28 Jan 2006 13:51:43 -0800 (PST) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id CD1CF5205D; Sat, 28 Jan 2006 16:51:42 -0500 (EST) Date: Sat, 28 Jan 2006 16:51:42 -0500 From: Kris Kennaway To: Andrew Pantyukhin Message-ID: <20060128215142.GA37639@xor.obsecurity.org> References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="u3/rZRmxL6MmkK24" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Cc: FreeBSD Ports , Pav Lucistnik , Kris Kennaway Subject: Re: pkg_delete and modified files 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: Sat, 28 Jan 2006 21:51:44 -0000 --u3/rZRmxL6MmkK24 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 29, 2006 at 12:44:50AM +0300, Andrew Pantyukhin wrote: > Looking for a solution to the problem we stumbled upon, > [which was keeping many modified files without the > cmp trick described in the porter's handbook] > I gave pkg_install/* sources a glance and now I'm > thinking about a quick fix. The -f flag causes files to be > deleted even in case of a checksum mismatch. In fact > the -f flag is meant for something slightly else: >=20 > Force removal of the package, even if a dependency > is recorded or the deinstall or require script fails. >=20 > So I'm thinking about another flag (like -F or a second > -f) to control the behavior with modified files. I think that > keeping them should be a default. I can't think of a > thing that it will break, maybe you can. The cmp trick > will still work. And it only takes a couple of lines to > implement. We can't do this by default for all ports because a lot of ports install files that are *supposed* to be modified by other ports (e.g. gettext), so those files would never get removed. I think you'd need to have some more fine-grained method to control this on a per-file basis. Kris --u3/rZRmxL6MmkK24 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQFD2+duWry0BWjoQKURAitrAKCTRcJ3/9IMucjloCmfCMe+4XDePACfaakA Dg5fqbRUKItc5FgHvBWknoI= =bDer -----END PGP SIGNATURE----- --u3/rZRmxL6MmkK24--