Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1060838

Summary: [RFE] Consider productid->repoid mapping when calculating active repos
Product: Red Hat Enterprise Linux 7 Reporter: Adrian Likins <alikins>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED NOTABUG QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bkearney
Target Milestone: rcKeywords: FutureFeature
Target Release: 7.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-06 18:20:55 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: 1121117    

Description Adrian Likins 2014-02-03 17:50:35 UTC
Description of problem:
See https://bugzilla.redhat.com/show_bug.cgi?id=971945#c7
(in particular, the [2] footnote, copied here)

[2] A potential improvement for this case would to be consider the product ids associated with repos in the comparison. Instead of just checking if an installed package from repo FOO is also available in some enabled repo (BAR), 
we would follow the productid->repo map, and require the productid is the same.

ie, a package installed from base rhel should have a repoid associated with it of some-base-rhel-server-repo which productid.js would map to product id 69. If the enabled repo that also provides that package also maps to productid 69, we would count that as 'active'. If the available enabled repo maps to a different product id (ie, "167"->"rhel-6-server-cf-ce-1-rpms"), we wouldn't consider that repo as 'active.

Note however, for the case in comment 1, this wouldn't help, since the repoid the 'rubygems' packages has, is not in productid.js, so we couldn't compare product ids.

This would let us detect cases where an installed package is known to have been installed from productid '70', but another product (3000.pem) provides a repo (some-other-repo) also provides that pkg. Currently, this results in both repo's being counted as active (ala, https://bugzilla.redhat.com/show_bug.cgi?id=971945). Since the repos associated with both product ids are 'active', neither product id will be deleted. For 3000, that may mean the product id is not deleted even when all the packages installed from that repo are removed (since there are packages installed from other repos that are _also_ in 3000/some-other-repo).

Comment 2 Bryan Kearney 2014-07-30 19:22:22 UTC
Acking 7.1

Comment 3 John Sefler 2014-10-28 17:52:44 UTC
This feature request was not implemented and delivered to QE by the rhel-7.1.0 Dev Freeze date of 10/27/2014.  Deferring for consideration in next release.