Ettore Di Giacinto
a0618107a8
Adapt tests
2020-02-26 23:56:21 +01:00
Ettore Di Giacinto
25f2abf103
Do conflict with same package versions while building formula
2020-02-26 23:01:08 +01:00
Daniele Rondina
def04724d4
Add support for build identifier on version
2020-02-20 17:46:47 +01:00
Ettore Di Giacinto
38296bc5d7
Add test for HashFingerprint()
2020-02-19 18:33:14 +01:00
Ettore Di Giacinto
7e16e0cdb6
Add HashFingerprint() to Package and consume it while generating image names
...
In this way we don't depend on the package fingerpint characters while generating images, allowing
to support completely semver (e.g. + character is not allowed in docker images tag).
This change is not backward compatible with images currently already built and will invalidate the cache
2020-02-19 18:28:29 +01:00
Ettore Di Giacinto
b01c017507
Add HumanReadableString() to Package
2020-02-18 18:20:45 +01:00
Ettore Di Giacinto
7e0ea34b81
Switch back to gophersat
2020-02-11 14:58:17 +01:00
Ettore Di Giacinto
6f6e2bf15f
Pin to gophersat version
...
Having the same var in the and block seems to make gophersat crash. Even if might be unoptimal,
we need this to tighten the conditions between packages.
Switch to gophersat fork until this fix is merged upstream:
https://github.com/crillab/gophersat/pull/17
2020-02-11 09:06:57 +01:00
Ettore Di Giacinto
33b442a832
Add accessor to decode from package String()
2020-02-10 17:14:46 +01:00
Ettore Di Giacinto
4dc4205868
Drop json skip from id. It prevents storm to track entities #55
2020-02-08 18:18:05 +01:00
Ettore Di Giacinto
0e30e6a1ad
Treat single conflict cases as well when building conflict formula
2020-01-31 20:50:55 +01:00
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