[Yum] Unexpected behaviour, range based dependency update.

George Bartlett podge_bartlett at hotmail.co.uk
Wed Feb 1 22:24:23 UTC 2017


Hi,


I have come across some unexpected behaviour when updating packages which have dependencies which also need updating. I own a package which is a dependency of a number in house applications. I constantly maintain, update and release new versions of this library package. Application packages which depend on this library package specify their requirement as a range i.e. libexample >= 1.0.0, libexample < 2.0.0.  I have recreated the scenario as follows:

  *   I have released libexample-1.0.0, libexample-2.0.0 and libexample-3.0.0 to a local yum repo.
  *   I have also released 2 application rpm's which have this library package as a dependency, to the same repo:
     *   exampleapp-1.0.0 depends on libexample >= 1.0.0, libexample < 2.0.0 (as specified in the spec file of exampleapp-1.0.0)
     *   exampleapp-2.0.0 depends on libexample >= 2.0.0, libexample < 3.0.0 (again, as per the apps spec file)
  *   No applications yet use libexample-3.0.0.

This causes the following behaviour, starting from a clean system:

>> yum install exampleapp-1.0.0
Resolving Dependencies
--> Running transaction check
---> Package exampleapp.x86_64 0:1.0.0-1 will be installed
--> Processing Dependency: libexample < 2.0.0 for package: exampleapp-1.0.0-1.x86_64
--> Processing Dependency: libexample >= 1.0.0 for package: exampleapp-1.0.0-1.x86_64
--> Running transaction check
---> Package libexample.x86_64 0:1.0.0-1 will be installed
--> Finished Dependency Resolution

All works fine, then try and update:

>> yum update exampleapp
--> Running transaction check
---> Package exampleapp.x86_64 0:1.0.0-1 will be updated
---> Package exampleapp.x86_64 0:2.0.0-1 will be an update
--> Processing Dependency: libexample >= 2.0.0 for package: exampleapp-2.0.0-1.x86_64
--> Running transaction check
---> Package libexample.x86_64 0:1.0.0-1 will be updated
--> Processing Dependency: libexample < 3.0.0 for package: exampleapp-2.0.0-1.x86_64
---> Package libexample.x86_64 0:3.0.0-1 will be an update
--> Finished Dependency Resolution
Error: Package: exampleapp-2.0.0-1.x86_64 (local)
           Requires: libexample < 3.0.0
           Removing: libexample-1.0.0-1.x86_64 (@local)
               libexample = 1.0.0-1
           Updated By: libexample-3.0.0-1.x86_64 (local)
               libexample = 3.0.0-1
           Available: libexample-2.0.0-1.x86_64 (local)
               libexample = 2.0.0-1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest


The output suggests that yum has realised that libexample should be less than (and not include) 3.0.0, but it appears to ignore it and attempt to update to the latest available version of libexample. Am I missing something here? Any help would be greatly appreciated.

Many thanks

George
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.baseurl.org/pipermail/yum/attachments/20170201/ae726171/attachment.html>


More information about the Yum mailing list