tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg_chk likes obsolete packages



On 24 July 2012 23:41, Mike M. Volokhov <mike.volokhov%gmail.com@localhost> 
wrote:
> Jul 22, 2012, 1:36 AM, David Brownlee wrote:
>
>> On 18 July 2012 23:42, Mike M. Volokhov <mike.volokhov%gmail.com@localhost> 
>> wrote:
>>> Hi,
>>>
>>> I found that pkgtools/pkg_chk doesn't pay attention if available
>>> binary package older than already installed one.  It results in
>>> a weird attempt to install obsolete packages.  For example:
>>
>> Its not so much that it likes obsolete packages, as that it tries to
>> ensure the installed packages exactly match what is in the binary
>> package set (or in the pkgsrc tree). There have been a couple of times
>> when I have depended on that behaviour of replacing a 'newer'
>> installed version with what is in the pointed to pkgsrc tree
>>
>> However, I can definitely see a use case for your patch. I really
>> don't want to add another option to pkg_chk, but maybe this deserves
>> one...
>>
>> Hmm, I could repurpose -B (Check the "Build version" of packages) to
>> mean "exactly match build version and even downgrade), and have your
>> modified behaviour as the default (though I'm not sure about
>> conflating the two behaviours of downgrading and checking build
>> version).
>>
>> What do you think?
>
> Having newer packages is essentially good.  But newer packages may
> broke dependency tree for older, but perhaps more consistent
> repository.  For example, you have png-1.5 installed, but older
> packages may rely on png-1.4, and 1.5 will not satisfy that
> requirement.  The underlying question is what is better to trust:
> installed packages, or the packages in depot.  It greatly depends,
> I say.
>
> So, I'd keep newer packages, and force discrepancy elimination with a
> pkg_chk option.  The -B looks like exactly such an option - i.e. it
> could force syncing to the depot, no matter is it older or newer than
> installed packages.

I've committed a lightly modified version - it will now always report
a mismatch, but if the installed package is newer than the package in
pkgsrc or packages it will not by default tag it to be updated (-B
overrides).

Thanks for the original patch :)

David


Home | Main Index | Thread Index | Old Index