Add support for Package provides

Add "provides" field in packages (which affect both runtime and buildtime deps).
It replaces all the occurences in the deptree before solving, actually
allowing to swap packages and provide virtuals. Along with a mechanism
for package rename #25.
This commit is contained in:
Ettore Di Giacinto
2019-12-17 19:32:31 +01:00
committed by Ettore Di Giacinto
parent 0627b03121
commit 15250bd991
21 changed files with 463 additions and 20 deletions

7
tests/fixtures/provides/c/build.yaml vendored Normal file
View File

@@ -0,0 +1,7 @@
image: "alpine"
prelude:
- echo foo > /test
- echo bar > /test2
steps:
- echo c > /c
- echo c > /cd

View File

@@ -0,0 +1,7 @@
category: "test"
name: "c"
version: "1.0"
provides:
- category: "bar"
name: "foo"
version: "1.0"

11
tests/fixtures/provides/d/build.yaml vendored Normal file
View File

@@ -0,0 +1,11 @@
prelude:
- echo foo > /test
- echo bar > /test2
steps:
- echo s > /d
- echo dd > /dd
requires:
- category: "bar"
name: "foo"
version: "1.0"

View File

@@ -0,0 +1,3 @@
category: "test"
name: "d"
version: "1.0"

View File

View File

@@ -0,0 +1,3 @@
name: "foo"
version: "1.0"
category: "bar"