Bug 786586

Summary: System Templates - repository duplicated in TDL export
Product: Red Hat Satellite Reporter: Brad Buckingham <bbuckingham>
Component: WebUIAssignee: Brad Buckingham <bbuckingham>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.1Keywords: Triaged
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:24:28 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Brad Buckingham 2012-02-01 20:42:54 UTC
Description of problem:

If a user adds a product to a system template and then also adds to the template one of the repositories that exists in that product, the generated TDL contains multiple entries for that repository.

This bugzilla is to ensure that when TDL export is generated, the output does not include duplicate repositories.

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

How reproducible:
always

Steps to Reproduce:
1. Create a product/provider/repo
2. Sync the repo
3. Go to Content Management -> System Templates
4. Create a new system template
5. Add the product from 1 to the template
6. Add the repo from 1 to the template
7. Save the template
8. Download the template
  
Actual results:
Observe that the template exported (downloaded) contains duplicate entries for the repo.

E.g. 
<repository name="rhel 6-1 repo">
<url>
https://localhost/pulp/repos/ACME_Corporation/Library/custom/rhel_6-1/rhel_6-1_repo
</url>
<persisted>No</persisted>
</repository>

<repository name="rhel 6-1 repo">
<url>
https://localhost/pulp/repos/ACME_Corporation/Library/custom/rhel_6-1/rhel_6-1_repo
</url>
<persisted>No</persisted>
</repository>

Expected results:
The repo should only be listed once in the TDL exported.

Additional info:

Comment 1 Brad Buckingham 2012-02-01 21:43:56 UTC
commit - 0e42b369c8131d976c7ca4de2bbae57e2b122a8f

Comment 2 Jeff Weiss 2012-02-10 15:41:33 UTC
Verified katello-0.1.231-1.git.1.4ca672f.el6.noarch

Comment 4 Mike McCune 2013-08-16 17:59:39 UTC
getting rid of 6.0.0 version since that doesn't exist