From owner-freebsd-ports@FreeBSD.ORG Tue Jan 31 12:55:21 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 C4BD716A420 for ; Tue, 31 Jan 2006 12:55:21 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: from zproxy.gmail.com (zproxy.gmail.com [64.233.162.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id C8DFD43D49 for ; Tue, 31 Jan 2006 12:55:20 +0000 (GMT) (envelope-from infofarmer@gmail.com) Received: by zproxy.gmail.com with SMTP id 8so1254125nzo for ; Tue, 31 Jan 2006 04:55:20 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LDxvT3mBPZPRTyxp6j80ntWCGIw2KJdWEdiI6BJhGiN2TMYIzDy0MmxaQqbk7w+8S1F7M9eT1Xdazo+Ahv3385Eu+1JXAcEwTuvDpDUIm3bzNb+VqUGd61u+TLV/KppYlMJpEG8B68EJ0pawpMf4oYZenliBiQc9ww8ZHB1M5+c= Received: by 10.36.79.5 with SMTP id c5mr5909205nzb; Tue, 31 Jan 2006 04:55:20 -0800 (PST) Received: by 10.37.20.11 with HTTP; Tue, 31 Jan 2006 04:55:20 -0800 (PST) Message-ID: Date: Tue, 31 Jan 2006 15:55:20 +0300 From: Andrew Pantyukhin To: Kris Kennaway In-Reply-To: <20060128215142.GA37639@xor.obsecurity.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <20060128215142.GA37639@xor.obsecurity.org> Cc: FreeBSD Ports , Pav Lucistnik 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: Tue, 31 Jan 2006 12:55:21 -0000 On 1/29/06, Kris Kennaway wrote: > 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: > > > > Force removal of the package, even if a dependency > > is recorded or the deinstall or require script fails. > > > > 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. Btw, I'd like to draw your attention to the fact that pkg_delete does this by default (for all ports). It's the undocumented fact of the '-f' flag, which is used quite often (but not always) that causes the files to be deleted. We can't rely on that anyway, this will cause much breakage sooner or later.