Dependency loops considered harmful?

Hans de Goede j.w.r.degoede at hhs.nl
Wed Sep 3 19:27:26 UTC 2008


Michael Schwendt wrote:
> On Wed, 3 Sep 2008 13:36:41 -0500 (CDT), Jon Ciesla wrote:
> 
>>> On Wed, 3 Sep 2008 12:10:13 -0500 (CDT), Jon Ciesla wrote:
>>>
>>>>> For example, why games data depend on binaries?
>>>> So that if we try to upgrade the version of the binaries and not the
>>>> data,
>>>> it will fail.
>>> Unconvincing.
>>>
>>> Why? Because the game program pkg could require a specific version of
>>> the data pkg to achieve the same. If game version gets bumped, dep
>>> would break, since you would need to update data pkg, too. Game requires
>>> compatible data. So far so good.
>>>
>>> However, if the data pkg requires the game pkg (versioned! or else it
>>> would not be strict enough for your needs), this only increases the
>>> risk that you need to bump'n'rebuild the data pkg if the game version
>>> is increased without needing any changed data. It's a superfluous
>>> dependency that only tries to enhance "yum remove" a bit.
>> How?  For game data, the convention is to require on name and version, but
>> not release.  If new data is required, it will change the version.  If
>> not, we only increment the binary rpm's release, so the data rpm matches
>> on version and needs no rebuild.
> 
> game-0.8  Requires  game-data = 0.8
> game-data-0.8  Requires  game    (which version? and why?)
> 
> Case 1) 
> game-data-0.8  Requires  game = 0.8
> What happens if game-1.0 is released with unchanged game-data?
> Then you need to update game-data for nothing else than the broken dep.
> 
> Case 2)
> game-data-0.8  Requires  game
> No version. Hence no dep breakage in all cases where you may update game
> without updating game-data. Instead, a strict dependency is installed
> in pkg game:  game-%{version}  Requires  game-data = %{SOME_version}
> Here you can control the game-data version within pkg "game".
> 

PLease take an actual look at game spec files before making up all kinds of BS, 
its really easy:

game Requires game-data = %{needed_data_version}
game-data Requires game >= %{first game version which uses this data}

Its as simple as that, as for this merely working around yum's broken remove, 
well here we can as there is a 1 on 1 relation, I agree there are other cases 
where deps get sucked in by an install and not removed by a remove. The fact 
that those other cases exist is not a good reason to not fix things for games.

Game <-> data is a one on one relation, the Requires reflect that, nothing to 
see here move along.

Regards,

Hans




More information about the fedora-devel-list mailing list