portmaster -s text (Was: Re: HEADS-UP: Shared Library Versions bumped)

Ben Morrow ben at morrow.me.uk
Tue Jul 28 11:42:13 UTC 2009


Doug Barton wrote:
> On Thu, 23 Jul 2009, Ben Morrow wrote:
> 
>> The problem with that is if you install pkg A deliberately, but it then
>> later becomes a dependancy of pkg B. If you remove pkg B (because it's
>> no longer needed) there is then no evidence that pkg A was installed on
>> purpose, rather than incidentally. portmaster -s will offer to remove
>> it, and if you refuse it will offer to remove the empty +REQUIRED_BY,
>> effectively promoting it to a 'manually installed' pkg again, though
>> it's perhaps not entirely clear from the question that that is what the
>> effect will be.
> 
> Thanks for pointing this out. Can you suggest an alternative message? 
> Other than the mundane reason the current message says what it does 
> because I sometimes prefer to leave the empty file there so that when I 
> go back through at a later date I can re-evaluate the choice.

Yes, I can see it needs to be an option. Presumably 'don't ask me again' 
is too Microsoft :)? Maybe something like 'Mark this package as 
explicitly required?'? That's pretty much the user-visible effect.

I know the first time I saw that message, when I didn't really 
understand what it meant, my reaction was 'Delete something? No!' which 
wasn't the right answer.

>> This would be easy to solve in general by maintaining a 'world' package,
>> or some such, that had dependencies on everything installed explicitly;
>> but that would require modifying all the pkg and port installation tools
>> (probably including bsd.port.mk itself) to support that convention.
> 
> This sort of mechanism has been suggested before, but the problem you 
> described (ports installed "on purpose" becoming a dependency of 
> something else) is not an easy one to solve.

No. I have occasionally wondered if a sensible solution would be to drop 
portmaster/portupgrade altogether and just maintain a local 
sysutils/world port with a list of what I want installed, and 'make 
deinstall reinstall' whenever it changes (with something like 
pkg_cutleaves to clear out the trash). I suspect I would lose something 
I'm currently relying on (certainly, portmaster's -o and -r options 
wouldn't be trivial to emulate) but it does seem to me that both 
portmaster and portupgrade spend an awful lot of time doing things like 
tracking dependancies that bsd.port.mk already does for you.

Ben


More information about the freebsd-stable mailing list