From owner-freebsd-ports@FreeBSD.ORG Sat Jul 7 22:36:26 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 3811316A41F; Sat, 7 Jul 2007 22:36:26 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout4.cac.washington.edu (mxout4.cac.washington.edu [140.142.33.19]) by mx1.freebsd.org (Postfix) with ESMTP id 1565413C448; Sat, 7 Jul 2007 22:36:26 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.7] (may be forged)) by mxout4.cac.washington.edu (8.13.7+UW06.06/8.13.7+UW07.06) with ESMTP id l67MaPXO026075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 7 Jul 2007 15:36:25 -0700 X-Auth-Received: from [192.168.10.45] (c-24-10-12-194.hsd1.ca.comcast.net [24.10.12.194]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.7+UW06.06/8.13.7+UW07.03) with ESMTP id l67MaJ4i004092 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 7 Jul 2007 15:36:23 -0700 Message-ID: <46901567.7040101@u.washington.edu> Date: Sat, 07 Jul 2007 15:36:23 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.4 (Windows/20070604) MIME-Version: 1.0 To: Michel Talon References: <20070707145958.GA3472@lpthe.jussieu.fr> <468FC617.6070304@FreeBSD.org> <20070707214108.GA4474@lpthe.jussieu.fr> In-Reply-To: <20070707214108.GA4474@lpthe.jussieu.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-PMX-Version: 5.3.2.304607, Antispam-Engine: 2.5.1.298604, Antispam-Data: 2007.7.7.151533 X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='__CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __USER_AGENT 0' Cc: Doug Barton , 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 22:36:26 -0000 Michel Talon wrote: > 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. > IMO adding packages (or ports in this case) should be done using pkg_install. It's the best means to transparently control package entries in the system, and it would probably reduce the load on the bsd.port* Makefiles. >>> 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. > Not unless you have metafiles laying around that identify leaf packages (i.e. directly user installed packages) over additional node packages (in this case dependency installed packages). >> 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. > There really isn't a way to work around this problem I believe other than to have a huge warning banner and show what would be deinstalled prior to the operation being executed. This is a slippery slope trying to deal with corner cases like these. -Garrett