Bug 755105

Summary: Dependency calculation isn't accurate
Product: Red Hat Satellite Reporter: Justin Sherrill <jsherril>
Component: APIAssignee: Tomas Strachota <tstrachota>
Status: CLOSED CURRENTRELEASE QA Contact: Garik Khachikyan <gkhachik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.0CC: bkearney, gkhachik, mkoci, tstrachota
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: katello-0.1.175-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-22 18:07:53 UTC Type: ---
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: 747354    

Description Justin Sherrill 2011-11-18 20:58:48 UTC
Description of problem:


Dependency calculation doesn't seem correct.  When adding a bind errata to a changeset and solving the dependencies for it (Changeset#calc_dependencies) , i get:

4 instances of "bash"
6 instnaces of "bind"
~20 instances of "bind-lib"
30 instances of "glibc"
and many more



There are several problems with this.  

1.  Why are the resulting dependencies only listed as "bash"  There should be some version number and arch listed
2.  I do not believe it is taking into account any packages already in the next environment.  In my instance, bash was already in the next environment.
3.  This was a bind errata and bind is a dependency? 
4.  Forgetting the above, I believe it is including multiple versions of the same package.  Is this what we want?  Or just include what the latest is that satisfies the dependency (assuming a version doesn't already exist in the next environment that satisfies it)?

Comment 1 Tomas Strachota 2012-01-06 16:42:22 UTC
I made some modifications in katello-0.1.169-1:
- filenames (nvra) are displayed instead of package names
- packages that have been promoted to the next environment are not included in the dependency list

There are still two questions left:
1) Should we include all available versions of dependent packages or just the latest?
2) We are currently calculating only first level of dependencies. Shouldn't we do it recurrently to satisfy the full dependency tree?

Comment 2 Tomas Strachota 2012-01-10 15:21:41 UTC
For the record:
1) We include only latest version of package if it has not been promoted previously
2) We calculate full dependency tree

The patch for this behaviour is ready.

Comment 3 Tomas Strachota 2012-01-11 16:35:35 UTC
Both changes are now available in katello-0.1.175-1.