Bug 8931 - replaces field does not support version constrains
Summary: replaces field does not support version constrains
Status: RESOLVED FIXED
Alias: None
Product: opkg
Classification: Yocto Project Subprojects
Component: opkg (show other bugs)
Version: 0.3.1
Hardware: x86 Multiple
: Undecided major
Target Milestone: 0.3.2
Assignee: Alejandro del Castillo
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-01-14 23:20 UTC by Alejandro del Castillo
Modified: 2016-06-02 18:53 UTC (History)
0 users

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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