pkg delete dilema

Brandon J. Wandersee brandon.wandersee at gmail.com
Tue May 10 20:56:29 UTC 2016


Matthew Seaman writes:

> On 10/05/2016 18:44, Mario Lobo wrote:
>> So, is there a way to tell pkg just to delete the package WITHOUT deleting
>> the dependent ports? If not, is there a way for me to remove just the
>> cups-client port? Or just force cups to get installed (make
>> FORCE_PKG_REGISTER=yes install issues the same problem as plain make above)?
>
> pkg delete -f cups-client
>
> 	Cheers,
>
> 	Matthew

>From the pkg-delete(8) man page:

| -f, --force
|            Forces packages to be removed despite leaving unresolved
|            dependencies.  In combination with the -a or --all flag,
|            causes pkg(8) to be removed as well as all other packages.

Correct me if I'm wrong, but that bit about "despite leaving unresolved
dependencies" is not inconsequential. Yes, it will allow Mario to
upgrade one port, but will also essentially leave all those ports with
recorded dependencies on outdated cups-* packages unresolvable, won't
it? That is, when it comes time to upgrade other ports pkg(8) will
then complain that dependencies of those ports can't be resolved, won't
it?

If not, then what of all the ports that depended on the previous version
of cups *and* the manner in which it and its components were previously
packaged? Isn't it best to state that rebuilding the whole "package
chain" will ensure it's intact, while forcibly removing one link in that
chain will possibly break the whole thing?

I could be wrong. I have to admit that I don't know all the ins-and-outs
of pkg(8), but (if I may be blunt) the conventional wisdom I learned
from my Arch Linux days was "Don't ever use 'pacman --force' unless you
know what you're doing---and if you think using 'pacman --force' is a
good idea, you don't know what you're doing."

-- 

::  Brandon J. Wandersee
::  brandon.wandersee at gmail.com
::  --------------------------------------------------
::  'The best design is as little design as possible.'
::  --- Dieter Rams ----------------------------------


More information about the freebsd-questions mailing list