Date: Sat, 7 Jul 2007 16:59:58 +0200 From: Michel Talon <talon@lpthe.jussieu.fr> To: freebsd-ports@FreeBSD.org Subject: Re: Keeping track of automatically installed dependency-only ports Message-ID: <20070707145958.GA3472@lpthe.jussieu.fr>
next in thread | raw e-mail | index | archive | help
Doug Barton said: > Jeremie Le Hen wrote: > > Hi, > > > > Is there a way to track dependency-only ports, so that if I install > > port0 which requires port1 which in turn requires port2 and so on, > > deinstalling port0 will deinstall portN up to the first one required > > by > > another port or one I explicitely installed. > > I realize that this is an old post, but the thread it generated > indicated that there is demand for this kind of functionality, and no > solutions were presented that I could see. > > Portmaster actually has what I believe you are looking for. Finding installed packages which have no REQUIRED_BY is easy, portmaster do it, check_pkg.py do it, but i don't think this is the solution of the problem. For example, port1 may require port2 which itself requires port3. Assume you remove port1, and that, as a consequence port2 and port3 are no more necessary. It is only port2 which has an empty REQUIRED_BY, as long as you have not removed port2, port3 mentions it in REQUIRED_BY. So the deletion should have to be recursive. Moreover on a large installation you may have a large number of ports that should be removed and should require user approval to do so. But it is hard to remember several months after the fact, if a port without REQUIRED_BY has been installed as a dependency or for a precise reason. The only reliable way to detect ports which have been installed as a dependency is to create a database indicating which ports have been required by the end user, and which ones have been automatically installed. Such a database doesn't exist in the FreeBSD ports system, and as a consequence, it cannot do a good job of cleaning the installed packages. Moreover due to the tendency of some "configure" scripts to detect automatically installed libraries and behave accordingly, the presence of unwanted and uncleaned ports may be not only a small inconvenience, but may have bad consequences. So i think it should be wise to introduce a database as indicated above, in the same way it has been introduced in aptitude as an enhancement of apt-get. -- Michel TALON
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070707145958.GA3472>