Bug 1282657

Summary: Typo in katello/repository.rb
Product: Red Hat Satellite Reporter: David O'Brien <daobrien>
Component: Content ViewsAssignee: Bryan Kearney <bkearney>
Status: CLOSED ERRATA QA Contact: Og Maciel <omaciel>
Severity: low Docs Contact:
Priority: unspecified    
Version: UnspecifiedCC: bbuckingham, bkearney, cwelton, omaciel, sthirugn
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/12591
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 09:20:23 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 David O'Brien 2015-11-17 01:19:39 UTC
Description of problem:

$ find . -name *.rb|xargs grep -s 'to deleting it'
./app/models/katello/repository.rb: "Please delete all Content View versions containing this repository before attempting to deleting it."))

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

Master repo

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

"...before attempting to deleting it"

Expected results:

"...before attempting to delete it"

Additional info:

Comment 1 Bryan Kearney 2015-11-24 16:27:15 UTC
Created redmine issue http://projects.theforeman.org/issues/12591 from this bug

Comment 2 Bryan Kearney 2015-11-24 17:05:10 UTC
Upstream bug assigned to bkearney

Comment 3 Bryan Kearney 2015-11-24 19:04:32 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/12591 has been closed
-------------
Bryan Kearney
Applied in changeset commit:katello|e0d72a956c45640f20b180416d362e9bbd7a8412.

Comment 6 Og Maciel 2016-03-24 20:18:30 UTC
Looked at file /opt/theforeman/tfm/root/usr/share/gems/gems/katello-3.0.0.9/app/models/katello/repository.rb in the local filesystem and it agrees with the change applied by this commit: https://github.com/Katello/katello/pull/5627/files


         errors.add(:base, _("Repository cannot be deleted since it has already been included in a published Content View. " \
                              "Please delete all Content View versions containing this repository before attempting to delete it."))

Comment 7 Og Maciel 2016-03-24 20:25:18 UTC
Also tested it via hammer by creating a new custom product, yum-based repo (synced) and add the repo to a content view which was then published. Attempting to delete the repo shows the error message with the correct text:

hammer> product list --organization-id 3
---|----------|-------------|--------------|--------------|------------------
ID | NAME     | DESCRIPTION | ORGANIZATION | REPOSITORIES | SYNC STATE
---|----------|-------------|--------------|--------------|------------------
16 | Zoo Repo |             | IBM          | 1            | Syncing Complete.
---|----------|-------------|--------------|--------------|------------------
hammer> repository list --organization-id 3
---|-----------------|----------|--------------|---------------------------------------------
ID | NAME            | PRODUCT  | CONTENT TYPE | URL
---|-----------------|----------|--------------|---------------------------------------------
38 | African Animals | Zoo Repo | yum          | https://omaciel.fedorapeople.org/fakerepo01/
---|-----------------|----------|--------------|---------------------------------------------
hammer> repository delete --id 38 --organization-id 3
Could not delete the Repository:
  Repository cannot be deleted since it has already been included in a published Content View. Please delete all Content View versions containing this repository before attempting to delete it.

Verified on Satellite 6.2.0 SNAP 5.1

Comment 9 David O'Brien 2016-04-18 00:48:55 UTC
Reset docs contact <> daobrien

Comment 11 errata-xmlrpc 2016-07-27 09:20:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501