Daniele Rondina
db7301f7bf
Align selector logic for explicit version with PkgSelectorConditionFromInt
2020-01-01 22:58:19 +01:00
Daniele Rondina
ebcf6075d0
database_mem: Add test for specific candidate
2020-01-01 22:55:19 +01:00
Daniele Rondina
0cb49a40c0
Support logging level and spinner customization
2020-01-01 13:43:22 +01:00
Daniele Rondina
4dffc658db
database_boltdb: Align review of version comparision logic
2020-01-01 13:43:21 +01:00
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
69be9a2dd1
Add FindPackageVersions to DB
2019-12-13 17:18:26 +01:00
Ettore Di Giacinto
8cab02ad88
Adapt test which checks for db ID
2019-12-06 16:30:20 +01:00
Ettore Di Giacinto
57181d7cbf
Add FindPackages()
...
The version inmemory is optimized, while the boltdb implementation is
not.
It returns a list of the same package but with all the versions present
in the db.
2019-12-06 16:29:15 +01:00
Ettore Di Giacinto
556668fcc4
Make Expand and Revdeps consume a database
2019-12-06 16:28:42 +01:00
Ettore Di Giacinto
595c10f357
Use fingerprint as ids in inmemorydb
2019-12-03 23:38:25 +01:00
Ettore Di Giacinto
58169770e1
Add test for FindPackageCandidate
...
Adapt tests for env
2019-12-01 23:24: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
e31f8820e2
Adapt tests
...
Adapt docker and package tests
Fix tree test
2019-11-29 19:01:54 +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
62af9c81d5
BoltDB fixups
...
Unmarshalling needs well-defined structs, also swap pointers in few places where needed.
There are few more TODOS pending (like getting UpdatePackage fixed properly)
2019-11-25 20:03:37 +01:00
Ettore Di Giacinto
a8b350fd8e
Implement uninstall
...
Also add RemovePackage in database implementation (boltdb is not tested yet)
Add test case for uninstall
2019-11-24 00:16:12 +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
32dea6f7fd
Add Best() to solver for package selection based on version
2019-11-16 14:40:58 +01:00
Ettore Di Giacinto
3e850e9607
Adapt tests and fixup races in spinner
...
Signed-off-by: Ettore Di Giacinto <mudler@gentoo.org>
2019-11-16 13:26:33 +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
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
b32a6c2286
Wrap errors
2019-11-04 17:13:53 +01:00
Ettore Di Giacinto
9dc8fccd12
Add Rel() accessor to package
2019-11-04 12:36:55 +01:00