Project

General

Profile

Actions

Bug #14147

closed

hammer content-view filter create ignores repos if name used instead of ID

Added by Andrew Kofink about 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Hammer
Target version:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1228890
Description of problem:

If I create and apply a filter rule (have tried include and exclude) and use the --repositories option to limit this filter to a particular repo there is no error message but the filter rules applies for all repos inside the CV:

hammer content-view filter create --type rpm --name 'excluding-emacs' --description 'Excluding emacs package' --inclusion=false --organization "$ORG" --repositories 'Red Hat Enterprise Linux 6 Server RPMs x86_64 6.5' --content-view "cv-os-rhel-6Server"

hammer content-view filter rule create --name 'emacs*' --organization "$ORG" --content-view "cv-os-rhel-6Server" --content-view-filter 'excluding-emacs'

If I use the --repository-id option instead of name it works as expected:

REPOID=$(hammer --csv repository list --name 'Red Hat Enterprise Linux 6 Server RPMs x86_64 6.5' --organization $ORG | grep -vi '^ID' | awk -F',' '{print $1}')
hammer content-view filter create --type rpm --name 'excluding-emacs' --description 'Excluding emacs package' --inclusion=false --organization "$ORG" --repository-ids ${REPOID} --content-view "cv-os-rhel-6Server"
hammer content-view filter rule create --name 'emacs*' --organization "$ORG" --content-view "cv-os-rhel-6Server" --content-view-filter 'excluding-emacs'

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

6.1 Beta

How reproducible:

See above.

Steps to Reproduce:
1. create a CV and add repos
2. create a filter + rule using --repositories option
3. publish CV and check if the filter affects only this or all repos inside CV

Actual results:

Affected Repositories: all

Expected results:

Affected Repositories: the one I've specified

Additional info:

Actions

Also available in: Atom PDF