Daniele Rondina
91d05b071d
Review version comparision logic
2020-01-01 13:43:21 +01:00
Ettore Di Giacinto
d941c9755b
Relax best match constraint rule
...
Or we could return unsat
2019-12-18 19:24:44 +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
0627b03121
Add IsSelector() to Package
...
It indicates if the package is a selector, by checking if versions
contains constraints signs (<>=)
2019-12-17 18:00:27 +01:00
Daniele Rondina
82c9795dc3
Add pkg description, url and license
...
* Move to mvdan.cc/sh/v3
* Improve RDEPEND parsing
2019-12-16 23:56:58 +01:00
Ettore Di Giacinto
d583fa8bf5
Force the solver to look at the best match first
...
Add support clauses to force the solver to look after the best match
first.
Closes #29
2019-12-16 17:56:52 +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
fb68f98b15
Enforce requirements
...
Make explicit that at least one must be selected
2019-12-14 01:02:12 +01:00
Ettore Di Giacinto
fa79afd6ba
Various fixes
...
We can't route the message to the spinner, we would hide deps tree
2019-12-14 00:31:21 +01:00
Ettore Di Giacinto
94f65f3c55
Drop superflous call
2019-12-14 00:07:46 +01:00
Ettore Di Giacinto
396c090bc7
Drop unused import
2019-12-13 23:46:04 +01:00
Ettore Di Giacinto
b8c62c3e85
Move selection logic to package BuildFormula()
2019-12-13 23:37:44 +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
adcd8df49e
Add Bigger/Lower to Package to allow version comparison easier
2019-12-13 17:18:51 +01:00
Ettore Di Giacinto
556668fcc4
Make Expand and Revdeps consume a database
2019-12-06 16:28:42 +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
91b3daf180
Drop Best from solver and add cases for solver with expansion
2019-11-29 19:01:51 +01:00
Ettore Di Giacinto
4031a4ae81
Marshal JSON of package without escapes
...
Otherwise >, < get escaped as JSON does that in favour of browsers
2019-11-29 19:01:50 +01:00
Ettore Di Giacinto
f71cc5281e
Offer World from database
...
Compute here world instead of scattering it in different structures.
Also move Best() in package and make expansion here #20
2019-11-29 19:01:48 +01:00
Ettore Di Giacinto
0d7b2cf448
Track installed files
2019-11-23 22:41:51 +01:00
Geaaru
4ef86170d4
package: Fix typo
2019-11-16 17:29:58 +01:00
Geaaru
8989d3f8d7
Add String implementation
2019-11-16 17:29:58 +01:00
Ettore Di Giacinto
6face9c980
Add package expansion during resolve deps
...
Closes #2
2019-11-16 14:58:50 +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
83fb1d1219
Add Matches() to pkg.Package
2019-11-15 18:04:46 +01:00
Ettore Di Giacinto
891daf4b71
Add package Revdeps expansion #12
2019-11-14 23:46:52 +01:00
Ettore Di Giacinto
ef54b3d4b5
Pass world as a pointer in expand
2019-11-14 23:20:28 +01:00
Ettore Di Giacinto
4c1c7451e7
Resolve deps before compiling
2019-11-12 08:48:07 +01:00
Ettore Di Giacinto
ea2a51ce66
Implement compilation with images
...
A compilespec with an image defined (and no seed) can now be compiled,
and an artifact delta is provided at the end of the process.
2019-11-10 10:48:07 +01:00
Ettore Di Giacinto
639d4438e1
Adapt tests
2019-11-08 18:30:53 +01:00
Ettore Di Giacinto
61c318d549
Set path during recipe load
...
Set path only when the recipe is loaded and not when it gets converted. In such way the internal temporary db knows where the sources where.
2019-11-04 17:14:32 +01:00
Ettore Di Giacinto
9dc8fccd12
Add Rel() accessor to package
2019-11-04 12:36:55 +01:00
Ettore Di Giacinto
4dab89d209
Add support to store the path of the loaded packages
2019-11-04 12:35:21 +01:00
Ettore Di Giacinto
8c86f6c84d
Drop ID from marshalled content
2019-11-04 11:11:33 +01:00
Ettore Di Giacinto
9ec316312f
Use singleton version of InMemoryDB when necessary (still needed from the solver)
2019-11-02 18:00:42 +01:00
Ettore Di Giacinto
ef1d0e5573
Make also deps recalculation concurrent
2019-11-01 16:26:11 +01:00
Ettore Di Giacinto
ff98bdfc16
Enable two-pass scan
...
Split dependency resolving ( definition <-> db mapping ) into a method of the tree (ResolveDeps),
and do not care of looking up for packages while parsing.
Note: it is slower but it is much accurate and we can
choose what to do with the ones which aren't resolved (and show a helpful message too).
2019-11-01 11:32:17 +01:00
Ettore Di Giacinto
e5db47a679
Add Explain() to Assertions and Packages
2019-10-31 12:38:59 +01:00
Ettore Di Giacinto
a5ceafca26
Add Tree parser with bolt
...
Also add Tree builder (Recipe) which can recompose trees.
2019-10-31 12:38:59 +01:00
Ettore Di Giacinto
c3197d70fc
Add boltdb implementation for packageset and db
2019-10-31 12:38:32 +01:00
Ettore Di Giacinto
0813f75546
Add packageset
2019-07-27 11:29:39 +02:00
Ettore Di Giacinto
db90a8f69c
Add package category and make fingerprint more unique
2019-06-14 17:40:24 +02:00
Ettore Di Giacinto
b29ce651b9
Expose Uses to interface
2019-06-12 21:32:15 +02:00
Ettore Di Giacinto
caa7c788ec
Drop State from package
...
Also tests for Clone()
2019-06-12 20:57:39 +02:00
Ettore Di Giacinto
cab133f229
Imeplement PackageDatabase
...
Consume InMemoryDatabase for now, which act as a singleton in-memory db.
2019-06-11 23:04:01 +02:00
Ettore Di Giacinto
f47e907dda
Refactor
2019-06-11 18:48:09 +02: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
86472e7bf5
Normalize input data beforeahead
2019-06-05 18:49:35 +02:00
Ettore Di Giacinto
632619fe91
Add uninstall
...
Uninstall can be done in different ways - the most accurate would be to try find a minimum subset of packages that gives conflicts and try to reduce them gradually.
E.g. this could be done with other SAT algorithms. For now we keep things simple and we compute the uninstalls as an indirect of an installation from an empty profile.
Also take care of corner cases where world has no clauses, and fixes a typo in building the world formula
2019-06-05 18:49:35 +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
5184a26e69
Build formulas recursively
2019-06-05 18:49:34 +02:00
Ettore Di Giacinto
e6239f416b
Make formula built less complex
2019-06-05 18:49:34 +02:00
Ettore Di Giacinto
1084941240
Draft
2019-06-05 18:49:34 +02:00