Project

Profile

Help

Story #2478

Updated by milan over 6 years ago

h2. Description 

 Given two repositories: 

 Repository A with packages: 
   Foo-1.0 
   Foo-2.0 
   Foo-3.0 
   Bar-1.0 
 Repository B with packages: 
   Foo-1.0 

 And assuming Bar-1.0 requires Foo >= 1.0. 

 As i understand it, if a user performs a unit copy of Bar-1.0 from Repository A into Repository B with dependency resolution turned on (recursive = true), currently it will copy all packages from Repository A into Repository B that satisfies all of Bar-1.0's dependencies.    In this example that would mean Foo-2.0, and Foo-3.0 are both copied to Repository B despite the fact that all of Bar-1.0's dependencies are already met in Repository B. 

 I think (and i think users would agree), that this should behave more like a 'yum install Foo-1.0' or a 'yum update Foo-1.0', in that it should only pull in dependencies that are actually needed by a client to install Bar-1.0 if they are not already in the target repository.    So in this example the unit copy would only pull in Bar-1.0 and no additional dependencies.  

 h2. Implementation 

 The PR https://github.com/pulp/pulp_rpm/pull/1122 implements the described behavior having the @libsolv@ solver consider the target repository content. 

 An optional, future (Pulp3) behavior of actually upgrading the content in the target repository under the same circumstances i.e the opposite behavior, can be enforced by providing the solver a job constructed with the @solv.Job.SOLVER_UPDATE@ flag 

   

Back