On 6/9/07, Johannes Winkelmann <jw@smts.ch> wrote:
At the risk of pointing out the obvious, there's a tool called pkgfoster which is included in opt/prt-utils [1] which looks for ports which have no dependencies. Unlike prt-get, it's interactive, so it'll ask for before installing a port, and will remember the decision.
Since it's interactive, I considered pkgfoster to really be a tool to assist manual dependency removal.
True. There's a slightly excessive path we could walk by keeping track of the list of packages installed or removed by prt-get, and allowing to revert to previous states (a kind of undo history).
There was a tool to do that, although you had to set the breakpoints manually, like (mockup, I don't remember how the syntax was exactly):
$ prt-state store $ prt-get depinst gnome-terminal [don't like it] $ prt-state revert
Unfortunately, as you mentioned, this would break if you continued to add/remove packages that had dependencies on anything underneath gnome-terminal.
Although the tool is not available anymore, unless you want multiple states this can be done by simply storing the list of installed packages for 'store' and diff'ing the current list of installed packages against the previously stored one and remove those only in the 2nd list. Of course, this will only work reliably if you do it immediately. With the additional call to 'dependent' this could be made fairly safe, though.
HTH, Johannes
What might help is to have a prt-get log that logs all activity--i.e. a readout for 'prt-get depinst obconf' would look like this: log: installed dependency 'openbox' for target 'obconf' log: installed target 'obconf' This would help with the occasional manual system cleanup. Also, if the logging were sufficiently verbose, a script could parse it and figure out how to remove a packages dependencies safely. Nathan