Bug 8931

Summary: replaces field does not support version constrains
Product: [Yocto Project Subprojects] opkg Reporter: Alejandro del Castillo <alejandro.delcastillo>
Component: opkgAssignee: Alejandro del Castillo <alejandro.delcastillo>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: Undecided    
Version: 0.3.1   
Target Milestone: 0.3.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Alejandro del Castillo 2016-01-14 23:20:46 UTC
The pkg->replaces array contains a list of the abstract packages replaced by the pkg. Abstract packages don't contain versions as they are an abstraction of all versions of a package. This effectively means that the Replaces field can only have package names, but not version constrains (eg. Replaces="a (<< 2.0)")

pkg-replaces should be a compound_depend_t*, and should work the same may pkg-conflicts (which does support version constrains).

This is failing the test issue50.py on both backends (internal solver and libsolv).
Comment 1 Alejandro del Castillo 2016-01-15 16:16:18 UTC
The use case where version strings are needed for Replaces

- Package a (1.0) contains /foo and /bar
- Package a (2.0) contains /bar
- Package b (2.0) contains /foo. 
   * It needs to define Replaces a (<< 2.0).
Comment 2 Alejandro del Castillo 2016-06-02 18:53:30 UTC
Fix on commit 6bf5df7b7e29f9deef4b6a37eb8a6cdcb96dc452