Content View Package Filter Rule architecture will not include all arches after updating
- Add repos to content view
- Create an excluding Content View package filter
- Save rule for a package included in the content view, but don't add an architecture. Specify "All Versions"
- Publish the content view (or use "show matching content" button if available) and see that its filtered out all rpms with that name. This is expected
- Edit the rule and save, keep the architecture blank again.
- Publish or check the rule again, notice now it doesn't filter out the packages
Filter continues to filter out all architectures with blank arch
It seems to be saving the architecture as nil on creation but "" on save
Fixes #27885 - Make architecture more flexible in CV filter rule
This allow an empty string to be used for the package filter rule architecture, keeping it more flexible.
We shouldn't enforce a strict nil as API clients, hammer, and the UI could be doing different things and
as long as its an "empty" value, we should treat it as matching all arches
I also added tests and switched !foo.blank? to foo.present? as the double negative is a bit confusing. They return opposite values so no behavior should change.
(`.present?` might not have been available when this was written)
See the issue for reproducing details