Pkg doesn't care about conflict

Franco Fichtner franco at lastsummer.de
Tue Sep 27 15:19:16 UTC 2016


> On 27 Sep 2016, at 5:05 PM, Miroslav Lachman <000.fbsd at quip.cz> wrote:
> 
> Margaret wrote on 09/27/2016 14:55:
> 
> [...]
> 
>>> Did you stop pkg in the middle or did you let it go? I think it will
>>> show you conflict message and ask you if you would like to deinstall PHP
>>> 7.0 and install 5.6 instead.
>>> 
>>> Miroslav Lachman
>> 
>> I stopped it immediately.
>> 
>> If you're right about it showing a conflct message (my memory
>> says you are), I'd think it would be friendlier to print the
>> message first, before anything is downloaded.  It routinely
>> checks versions, so putting out the conflict message immediately,
>> even before showing the proposed downloads, shouldn't be hard.
> 
> I think that conflicts are defined in package metadata so pkg don't know about conflict until package is downloaded. Maybe I am wrong. I didn't examine pkg internals too deep.

There is no concept of conflicts in package metadata.  The resolver
will figure out if packages conflict at runtime and it may run into
conflicts later due to replacing or installing packages that use the
same files, different shared libraries and maybe more (IDK).

It has occasionally stripped innocent top packages in systems for
me.  It looks like it doesn't virtually resolve through the whole
process but goes ahead with some operations that it later can't
roll back and just goes on taking a previous "y" as a base line.


Cheers,
Franco


More information about the freebsd-ports mailing list