Tag inheritance and "masked" newer builds

Mike McLean mikem at redhat.com
Wed Jan 19 20:16:24 UTC 2011


On 01/19/2011 11:34 AM, Alan Franzoni wrote:
> Hello,
> we've just found out a behaviour we'd like to change in koji.
>
> Simple case:
>
> two tags: child and parent, with child (obviously) inheriting from parent.

This is the correct behavior. Furthermore you will note that the 
'latest' build in a given tag is the one that was most recently tagged 
there rather than the one with the greatest version-release.

Without this behavior, you would not be able to override builds further 
down the inheritance, or within a tag.

> builds:
> foopkg-1.0.0-1 is tagged 'child'
> foopkg-2.0.0-1 is tagged 'parent'
>
>
> If I list the builds in the 'child' tag, setting inherited and latest,
> i get foopkg-1.0.0-1 - it seems that koji resorts to inheritance only
> if a build for a package name does not exist in the required tag.

While different folks use tags and inheritance differently, I would 
generally consider such a situation to be incorrect tagging. Inheritance 
is intended as a progression of sorts, so I don't think it makes sense 
to tag an older build in a child tag unless you are deliberately overriding.

You might want to scan for such situations and correct them as need be. 
I may have a script around here that does something like this.

> Is there any way to prevent this from happening, and get the "truly
> latest" build for a package in the 'child' tag?

No, and I don't see that changing.

What I can see is adding a policy check that could be used in the tag 
policy to prevent such masking builds from being tagged (though of 
course admins can override tag policy with --force).


More information about the buildsys mailing list