Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Jul 2007 23:41:08 +0200
From:      Michel Talon <talon@lpthe.jussieu.fr>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: Keeping track of automatically installed dependency-only ports
Message-ID:  <20070707214108.GA4474@lpthe.jussieu.fr>
In-Reply-To: <468FC617.6070304@FreeBSD.org>
References:  <20070707145958.GA3472@lpthe.jussieu.fr> <468FC617.6070304@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070707214108.GA4474>