Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 977485

Summary: distribution label creation should use [base_product] section
Product: [Retired] Pulp Reporter: Justin Sherrill <jsherril>
Component: rpm-supportAssignee: pulp-bugs
Status: CLOSED NOTABUG QA Contact: Preethi Thomas <pthomas>
Severity: low Docs Contact:
Priority: high    
Version: 2.1.1CC: bcourt, jsherril, mhrivnak, mmccune, rbarlow
Target Milestone: ---Keywords: Triaged
Target Release: 2.4.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-23 21:38:56 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:
Bug Depends On:    
Bug Blocks: 950743    

Description Justin Sherrill 2013-06-24 16:35:24 UTC
Description of problem:

Currently distribution label calculation seems to only use the name and version under the 'general' section of a .treeinfo file.

Apparently it also needs to take into account the [base_product] section as well. 

See example below.  Otherwise two trees that are the same but otherwise have a different base product will be treated as the same even though they are different.




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


How reproducible:


Steps to Reproduce:
1.  Create two repos with distributions with the same name and version but with different versions of base products
2.  Try to sync both


Actual results:
One will fail with a checksum mismatch because it is pointing to the distribution of the other.


Expected results:
Both sync pointing to different distributions



example .treeinfo:


[base_product]
name = Red Hat Enterprise Linux
short = RHEL
version = 6

[checksums]
repodata/repomd.xml = sha256:669285b73de569b3e7b53ed5a63f5b08f53c0625a6f9c6fb1c14b71184b8a30a

[general]
; WARNING.0 = THIS SECTION IS DEPRECATED
; WARNING.1 = See productmd (treeinfo(5)) documentation for more details about the current format
arch = x86_64
family = Red Hat Satellite
name = Red Hat Satellite 6.0.1
packagedir = Packages
platforms = x86_64
repository = .
timestamp = 1372061922
variant = Satellite
version = 6.0.1





In our case the repos in question really didn't need a .treeinfo file, but since this caused the repo sync to completely fail, i figured it was worth filing.

Comment 1 Michael Hrivnak 2013-06-26 14:14:58 UTC
Justin has expressed that this is not an immediate blocker, but could cause problems down the road.

Fixing this will require a re-visit of what we can expect to be in a treeinfo file, so we can reliably produce unique unit keys.

We should also consider if the checksum for repomd.xml needs to be modified at publish time on our end to match the published repomd.xml file.

Comment 2 Barnaby Court 2013-12-02 18:49:34 UTC
Can you provide details of the [base_product] section and the fields that are valid within this section of the treeinfo file?  

When building up the unique key for the distribution, what are the optional fields that should be used from the base_product section of the file?

Comment 3 Justin Sherrill 2013-12-05 14:31:56 UTC
As we discussed the other day I was no longer able to find any repositories with this structure.

Honestly unless rel-eng suggests they plan on publishing repos with this style of information in the future i'm okay with closing this bug for now.

Comment 4 Randy Barlow 2013-12-23 21:38:56 UTC
I'm going to close this bug, as per Justin's comment.