[Yum-devel] [PATCH] Use state-aware filename rpmdb index if rpm supports it

Panu Matilainen pmatilai at laiskiainen.org
Wed Aug 31 18:49:03 UTC 2011


On 08/31/2011 09:20 PM, James Antill wrote:
> On Wed, 2011-08-31 at 13:52 -0400, James Antill wrote:
>> On Wed, 2011-08-31 at 19:57 +0300, Panu Matilainen wrote:
>>> On 08/31/2011 05:59 PM, James Antill wrote:
>>>>    I guess we could add a new API ... but using that API for file requires
>>>> logic, when we'd have to ignore our current caches, seems less than
>>>> optimal.
>>>
>>> Optimal or not, I just think correctness should always come before speed.
>>
>>   I'm not saying this is a bad thing for rpm to be doing ... but it's not
>> just a simple bugfix to get to 100% "fixed".
>
>   Just tested and files are allowed in "conflicts", so this will now be
> valid:
>
> rpm -Uvh foo*.rpm =>  installs both /usr/bin/foo's
> rpm -e foo.x86_64
> rpm -Uvh conflicts-foo*.rpm =>  "Fine" as it conflicts with /usr/bin/foo
> # At this point you can't upgrade or even reinstall foo.i686, even
> # though it's provides would be identical.
>
> ...another maybe good rule we could do inside yum is to extend
> protected_multilib so that we only allow:
>
> 1. Both foo.i686 and foo.x86_64 installed at once.
>
> 2. foo.i686 installed on it's own.
>
> 3. foo.x86_64 installed on it's own.
>
> 4. foo.i686 can be removed on it's own.
>
> ...so if you had foo.i686 installed then you couldn't install foo.x86_64
> without removing foo.i686 ... and if you had both installed, you
> couldn't remove just foo.x86_64. Basically just outlawing all the weird
> edge cases.

This is very close to what I intend to enforce on rpm side once I figure 
out how to sanely do it, but the above unnecessarily prohibits some 
non-problematic cases: installation order does not matter at all,  the 
only case that really needs to be prevented is removing foo.x86_64 when 
foo.i686 has 'wrong color' files in it. In effect, when 'wrong color' 
files are present that package should behave as it dependended on the 
package /really/ owning that file.

	- Panu -





More information about the Yum-devel mailing list