Bug 1465070

Summary: [Regression] Content-view include filter for package adds unwanted packages too to the published version
Product: Red Hat Satellite Reporter: vivpatil
Component: Content ViewsAssignee: Adam Price <adprice>
Status: CLOSED DUPLICATE QA Contact:
Severity: high Docs Contact:
Priority: urgent    
Version: 6.2.10CC: bchardim, bkearney, ealcaniz, mmccune, xdmoon
Target Milestone: UnspecifiedKeywords: Regression
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-30 20:50:01 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description vivpatil 2017-06-26 14:41:43 UTC
Description of problem:
Content view include package filter not working as expected while matching the version. When a content view filter is created for a package for e.g "xorg-x11-drv-vmmouse" from RHEL7 Server repository with version equal to "13.0.0-11.el7" it will include all the packages that have the version pattern matching to "13.0.0" in their name . See below
---
xorg-x11-drv-vmmouse-13.0.0-12.el7.x86_64.rpm
xorg-x11-drv-vmmouse-13.0.0-11.el7.x86_64.rpm
xorg-x11-drv-vmmouse-13.0.0-10.el7.x86_64.rpm
---

In the issue this the filter for package xorg-x11-drv-vmmouse equals version "13.0.0-11.el7" matches all the above packages when it should only match xorg-x11-drv-vmmouse-13.0.0-11.el7.x86_64.rpm . The issue occurs for other packages too.

Version-Release number of selected component (if applicable):
Satellite 6.2.10

How reproducible:
Always

Steps to Reproduce:
1. Create a content-view with RHEL7 Server repository.
2. Create an Include filter for package xorg-x11-drv-vmmouse that equals to version "13.0.0-11.el7" . And publish a new version. The published version should only contain a single included package. However it contains extra packages as mentioned in the bug description.

Actual results:
The pattern matching within content view filters for package version does not works and includes redundant packages.

Expected results:
Content View should only contain the included packages.

Additional info:
THe issue seems that version is only matched for string before the "-" in the package name.

Comment 1 Edu Alcaniz 2017-06-26 14:56:06 UTC
Setting the flags.

Comment 4 Mike McCune 2017-06-27 12:58:29 UTC
Confirmed this works correctly in 6.1.11 and fails as described in the bug in 6.2.10. Working to determine if this was recently introduced by testing on 6.2.8

Comment 5 Mike McCune 2017-06-27 18:42:20 UTC
Confirmed this also occurs with 6.2.8.

Comment 6 Mike McCune 2017-06-27 18:42:54 UTC
The issue is that we aren't parsing the Release field when doing the filter.

Comment 9 Adam Price 2017-06-30 15:40:36 UTC
found a related bugzilla: 1395642

related redmine: http://projects.theforeman.org/issues/17916

Comment 10 Adam Price 2017-06-30 15:44:00 UTC
err bug 1395642

Comment 13 Mike McCune 2017-06-30 20:46:48 UTC
This is actually a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1395642 which is already resolved.

Will be releasing HOTFIX packages on the above mentioned bug and closing this out as a duplicate.

Follow 1395642 for updates.

Comment 14 Mike McCune 2017-06-30 20:50:01 UTC

*** This bug has been marked as a duplicate of bug 1395642 ***