Bug #17486
closedContent view filter version "Equals To" matching all packages instead of only one.
Description
In case there are multiple packages of the same version but different package release version in a repository and if this repository is included in a content view with "rpm version filter" they are not being properly filtered and all the packages are being included in the cv regardless their release version.
Ex:
List of packages in repo:
test-1.0-1.el7.x86_64
test-1.0-2.el7.x86_64
test-1.0-14.el7.x86_64
test-1.0-41.el7.x86_64
Filters:
[vagrant@centos7-hammer-devel hammer-cli-katello]$ hammer s localhost:3000 content-view filter list --organization-id 1 --content-view-id 7|------------------|------|----------
---------
FILTER ID | NAME | TYPE | INCLUSION
----------|------------------|------|----------
2 | include-4one-pkg | rpm | true
----------|------------------|------|----------
[vagrant@centos7-hammer-devel hammer-cli-katello]$ hammer s localhost:3000 content-view filter rule list --content-view-id 7 --content-view-filter-id 2|-----------|------|-------------------|-----------------|-----------------|-----------|------------|---------
-------
RULE ID | FILTER ID | NAME | VERSION | MINIMUM VERSION | MAXIMUM VERSION | ERRATA ID | START DATE | END DATE
--------|-----------|------|-------------------|-----------------|-----------------|-----------|------------|---------
2 | 2 | test | 1.0-41.el7.x86_64 | | | | |
--------|-----------|------|-------------------|-----------------|-----------------|-----------|------------|---------
With this setup, all the packages listed above will be included in the newly published CV
Version-Release number of selected component (if applicable):
6.2.x (6.1.x as well)
Steps to reproduce:
1) Create product, repository and some fake packages with same version but different release versions (see example above)
2) Create content view, add the repo from step #1 into it and create filter based on the example above
3) Publish the CV and check results
Actual results:
All packages are being included
Expected results:
Only specific version(s) should be included. Package matching "Equals To => 1.0-41.el7.x86_64" should only be published in the version.
Files