Commit Graph

26 Commits

Author SHA1 Message Date
Ettore Di Giacinto
5e8a29caf5
Detect already installed packages when calling install
We wasn't checking this previously, which was drawing weird errors on the CLI
2020-01-01 11:58:33 +01:00
Ettore Di Giacinto
15250bd991 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.
2019-12-17 19:32:31 +01:00
Ettore Di Giacinto
fe608469d8
Do not call solver multiple times, reuse same assertion
Introduce Cut(), it allows to filter in the assertion to achieve the same hashes
2019-12-14 15:00:16 +01:00
Ettore Di Giacinto
c4b83605ef
Add SearchByName and avoid false positive due to greedy search 2019-12-14 09:12:49 +01:00
Ettore Di Giacinto
66f2115cd1
Decoder must search in assertions only 2019-12-13 23:45:02 +01:00
Ettore Di Giacinto
926f636dff
Revert "Do not allow multiple versions in the results"
This reverts commit 15534ce253.
2019-12-13 23:05:09 +01:00
Ettore Di Giacinto
15534ce253
Do not allow multiple versions in the results
This happens because we select the best instead of selecting the best match in Package BuildFormula()

- Extend the selection test
- Select from databases when ordering
- Relax assertions search
- Split compile step in test
- Adapt tests

Note: This is temporarly until we treat this case in BuildFormula() inside Package
we need to build the constraints between all the requires when expanding
and then create a new constraint that selects the best match
2019-12-13 22:10:12 +01:00
Ettore Di Giacinto
55fa7265e5
Move selection logic to a db accessor #19
In this way the compiler consume such accessor, and make it possible to expand whenever used
2019-12-01 19:11:31 +01:00
Ettore Di Giacinto
d0c84d24a0
Expand also when ordering assertions 2019-11-29 19:01:52 +01:00
Ettore Di Giacinto
c9d93454b8
Drop IsFlagged() from what the solver considers 2019-11-29 19:01:47 +01:00
Ettore Di Giacinto
b5381e0248
Make solver consume databases instead of world lists
first step - it is slower in the implementation for now, but all cases
seems to be sorted out.
Drop Flagged() and IsSet() from solver. the solver wont care, and only
the assertion value does matter (exception for uninstall)
2019-11-29 19:01:41 +01:00
Ettore Di Giacinto
542d45a646
Do not use interface in struct used for serialization 2019-11-23 00:29:44 +01:00
Geaaru
8989d3f8d7 Add String implementation 2019-11-16 17:29:58 +01:00
Ettore Di Giacinto
b2060c82e3
Make DB Switchable
Fixes races conditions and make the DB Switchable. Also prepare inside
the CompilationSpec the tree of the deps to be built, and parallelize
only the building jobs.

Closes #7

Signed-off-by: Ettore Di Giacinto <mudler@gentoo.org>
2019-11-16 13:26:33 +01:00
Ettore Di Giacinto
c95e0ed91d
Add revdep calculation
Add CompilationSpecs type to handle slices of CompilationSpec, to
perform operation such as Unique() and Remove().

Add also dependencies and the spec associated to the Artifact, to track
how the artifact was generated.

Add revdeps compilation wrapper, and unit tests
2019-11-15 18:11:26 +01:00
Ettore Di Giacinto
83fb1d1219
Add Matches() to pkg.Package 2019-11-15 18:04:46 +01:00
Ettore Di Giacinto
a85f4a53ec
Fix topological ordering
Keep unordered things on top and add two ways of topological sorting

Note: AssertionHash cannot order here as doesn't know the start point
2019-11-12 17:28:22 +01:00
Ettore Di Giacinto
e7a328bca7
Fix compilation and hash image calculation. Tests fails on spec (installing d) 2019-11-12 00:13:03 +01:00
Ettore Di Giacinto
8550265d75
Add assertion hashing 2019-11-11 14:58:12 +01:00
Ettore Di Giacinto
2dd56e9e49
Create a type for lists of PackageAssertion, and move Order() inside it 2019-11-11 11:02:47 +01:00
Ettore Di Giacinto
e5db47a679
Add Explain() to Assertions and Packages 2019-10-31 12:38:59 +01:00
Ettore Di Giacinto
ff582ce77c
Enhance Uninstall and resolve conflict sets
Compute a minimum conflict set over the uninstall.

Adds also tests for specific cases covered by Uninstall now
2019-06-11 18:03:50 +02:00
Ettore Di Giacinto
0bb72e67fd
Refactor package imports 2019-06-05 19:13:09 +02:00
Ettore Di Giacinto
39a3e433a7
Cleanup 2019-06-05 18:49:34 +02:00
Ettore Di Giacinto
a342bc515f
Implement basic install algorithm 2019-06-05 18:49:34 +02:00
Ettore Di Giacinto
1084941240
Draft 2019-06-05 18:49:34 +02:00