[Mageia-dev] RFC: Add versioned require in rpm on rpm-helper

Pascal Terjan pterjan at gmail.com
Mon Apr 16 16:00:06 CEST 2012


On Mon, Apr 16, 2012 at 14:45, Colin Guthrie <mageia at colin.guthr.ie> wrote:
> 'Twas brillig, and Pascal Terjan at 16/04/12 14:35 did gyre and gimble:
>> On Mon, Apr 16, 2012 at 14:23, Colin Guthrie <mageia at colin.guthr.ie> wrote:
>>> 'Twas brillig, and Thierry Vignaud at 16/04/12 13:04 did gyre and gimble:
>>>> On 16 April 2012 13:15, Colin Guthrie <mageia at colin.guthr.ie> wrote:
>>>>> <snip>
>>>>>
>>>>> So just to make sure I'm following this right:
>>>>>  1. Versioned require will fix urpmi-based upgrades.
>>>>>
>>>>>  2. Installer (fresh-install) will be fine because basesystem-minimal
>>>>> will pull in rpm which will pull in rpm-helper.  WE can be confident
>>>>> this will happen early.
>>>>
>>>> No you cannot on upgrade.
>>>> Package ordering will depends on versioned requires.
>>>
>>> I don't understand... This is a fresh install, where did upgrade come
>>> into it?
>>>
>>> Just to clarify, the *fresh install* case is fine, it's the *upgrade*
>>> case (which I specifically outlined separately below to avoid confusion
>>> - although that clearly failed) that has the problem. Correct?
>>>
>>>>>  3. Installer (upgrade) will still be broken as it does not treat the
>>>>> rpm package inside the chroot as any kind of priority update that is
>>>>> installed early in the upgrade process.
>>>>
>>>> installer upgrade will be OK if systemd unit packages require a recent
>>>> enough rpm-helper
>>>
>>> I wasn't really looking for solutions, just trying to understand the
>>> problem clearly. Proposed solutions often cloud the thinking about the
>>> problem itself.
>>>
>>>
>>> So putting "Requires(pre): systemd-units" in all packages providing a
>>> systemd unit seems wrong (it doesn't require systemd-units at all, so
>>> this is a fake requires).
>>>
>>> Putting "Requires(pre): rpm-helper >= $ver" also seems somewhat overkill
>>> and hard to maintain (e.g. what if some other new thing goes into
>>> rpm-helper? We have to rebuild all packages that use any of the macros
>>> inside it to get the appropriate versioned require which seems awkward
>>> and hard to maintain[1]).
>>
>> If a package requires a new script, it means there is a call to this
>> script, so I would expect that it was built after this new script was
>> added.
>
> OK, but at present most of the packages that make use of %_post_service
> and friends do not actually require rpm-helper at all. They simply rely
> on it being there from basesystem-minimal.
>
> So I guess doing autorequires would work in most cases - this case i
> somewhat special as we're retro fitting the requirement, and thus need a
> mass-rebuild.
>
> I guess I can live with this if someone can do the necessary foo to add
> the appropriate requires automatically.

I don't think this is possible without patching rpm :(
The scripts adding dependencies are working on the list of files in the package.
The dependencies for scriptlets are added by rpm-build itself (and
only for the interpreter).

> I can't help but feel this would still be more appropriately dealt with
> in the installer by making it honour priority updates, even on a
> not-currently-running machine.

Well this does not guarantee anything, the packages may become part of
the priority upgrade (like any depending on perl) and be installed
before the new rpm-helper


More information about the Mageia-dev mailing list