From owner-freebsd-ports@FreeBSD.ORG Sat Jul 7 21:41:13 2007 Return-Path: X-Original-To: freebsd-ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 398B816A41F for ; Sat, 7 Jul 2007 21:41:13 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from shiva.jussieu.fr (shiva.jussieu.fr [134.157.0.129]) by mx1.freebsd.org (Postfix) with ESMTP id DC72C13C459 for ; Sat, 7 Jul 2007 21:41:12 +0000 (UTC) (envelope-from michel@lpthe.jussieu.fr) Received: from parthe.lpthe.jussieu.fr (parthe.lpthe.jussieu.fr [134.157.10.1]) by shiva.jussieu.fr (8.13.8/jtpda-5.4) with ESMTP id l67Lf9Fk022257 ; Sat, 7 Jul 2007 23:41:10 +0200 (CEST) X-Ids: 166 Received: by parthe.lpthe.jussieu.fr (Postfix, from userid 10096) id D6349BF6D3; Sat, 7 Jul 2007 23:41:08 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on parthe.lpthe.jussieu.fr X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.1.9 Received: from niobe.lpthe.jussieu.fr (niobe.lpthe.jussieu.fr [134.157.10.41]) by parthe.lpthe.jussieu.fr (Postfix) with ESMTP id 199B6BF5F7; Sat, 7 Jul 2007 23:41:08 +0200 (CEST) Received: by niobe.lpthe.jussieu.fr (Postfix, from userid 2005) id 0F2FE80; Sat, 7 Jul 2007 23:41:08 +0200 (CEST) Date: Sat, 7 Jul 2007 23:41:08 +0200 From: Michel Talon To: Doug Barton Message-ID: <20070707214108.GA4474@lpthe.jussieu.fr> References: <20070707145958.GA3472@lpthe.jussieu.fr> <468FC617.6070304@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <468FC617.6070304@FreeBSD.org> User-Agent: Mutt/1.4.2.2i X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-3.0 (shiva.jussieu.fr [134.157.0.166]); Sat, 07 Jul 2007 23:41:10 +0200 (CEST) X-Virus-Scanned: ClamAV 0.88.7/3608/Sat Jul 7 19:56:44 2007 on shiva.jussieu.fr X-Virus-Status: Clean X-Miltered: at shiva.jussieu.fr with ID 46900875.003 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! Cc: freebsd-ports@FreeBSD.org Subject: Re: Keeping track of automatically installed dependency-only ports 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, 07 Jul 2007 21:41:13 -0000 On Sat, Jul 07, 2007 at 09:57:59AM -0700, Doug Barton wrote: > > > The only reliable way to detect ports which have been installed as > > a dependency is to create a database > > *shudder* You just tripped over your own argument here. There are > plenty of ways that we could recognize a port that was installed as a > dependency. The one that comes immediately to mind is to create a flag > file in /var/db/pkg/foo (or /var/db/ports/foo) to indicate that the > port was installed as a dependency. It would be trivial for portmaster > and portupgrade to do this, slightly more complicated for it to be > done in bsd.port.mk, but not impossible. > I agree completely with you. Of course when i say that a database has to be created, this may very well be reduced to a flag somewhere in /var/db/pkg. For me, /var/db/pkg is a database describing the installed ports. Wether abusing the filesystem to create this database is good for performance is a completely different problem, at least it has the advantage of being very transparent. > > indicating which ports have been required by the end user, and > > which ones have been automatically installed. > > Well, what happens if an application (rather than a library) gets > installed as a dependency, but you decide that you like that > application, and want to keep it? How do you "promote" something from > "dependency installed" to "user installed?" Indeed you are right, it should be possible to decide of such a promotion. > > Personally I think that portmaster's approach is the right one. If you > accidentally delete something that it turns out you really do need, > you can always install it again. On the other hand, the presence of an > empty +REQUIRED_BY file is a very reliable indication that something > was previously installed as a dependency, but is no longer needed. > Typically you can install the java jdk to do programming, and without any required_by stuff. If you accidently erase it, it will be expensive to recreate. Obviously this is not a very good example because this one you will remember. I was thinking more to some obscure ports that you install by curiosity. After several months, perhaps you discover it is on your machine, and you have some use for it. Perhaps if you had erased it, the distfile would have disappeared, or marked broken with new versions of FreeBSD, no more compilable, etc. > I'd be interested to hear if others have opinions about this ... Sure this is a point of interest, the more opinions, the better. -- Michel TALON