#1135 Allow hub policy to match build NVRs
Closed by tkopecek. Opened by mizdebsk.
mizdebsk/koji policy-match-nvr  into  master

Download 1135.patch

:thumbsup:

:thumbsup:
What I was thinking was to split build['nvr'] to nvr dict. But not sure if anybody has a use for such test - glob on whole nvr doesn't need to match properly, if only e.g. release should be tested.

Or we could simply have separate checks for version and release - there is already check for name IIRC.

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

Taking a step back, testing the nvr string with glob patterns is flawed and prone to error. If we add just this, folks will use it to effectively test for versions with patterns like *-1.1-*, but such a pattern could also match a 1.1 in the package name. Note that the issue listed as fixed is asking to match version and release, not nvr.

I fiddled around and split it into separate version and release tests

https://github.com/mikem23/koji-playground/commits/pagure/pr/1135

Looking at it, I wonder: Is glob matching sufficient here? Will folks need a version compare (e.g. greater than, less than)?

Is anyone opposed to the separate version and release tests as above? If not, I can merge that. I suppose that an ordered compare could be a future enhancement. The use case that started this doesn't need it.

Since my updated version is fairly different, I've filed it as a separate PR. Please review here:

https://pagure.io/koji/pull-request/1513

Dropping this one in favour of merged #1513

Pull-Request has been closed by tkopecek

Metadata