Commit Graph

31 Commits

Author SHA1 Message Date
Ettore Di Giacinto
233429bbeb Allow to search by file
Also make possible to retrieve the artifact when searching for matches
between repositories list. This made possible to show the package list
when calling `luet search`.
2021-02-28 18:42:58 +01:00
Ettore Di Giacinto
38c9540a1d Use DB copy in GetRevdeps in BoltDB 2020-12-30 01:12:09 +01:00
Ettore Di Giacinto
736c9470cf Add db copy and clone 2020-12-19 17:45:50 +01:00
Ettore Di Giacinto
f4e2f32aff Return candidate not found when appropriate 2020-12-19 14:57:42 +01:00
Ettore Di Giacinto
39c8895f80 Return provided if selector isn't a range in boltdb 2020-12-17 23:17:40 +01:00
Ettore Di Giacinto
1f807f369a Move revdeps computation to db 2020-11-20 17:23:21 +01:00
Ettore Di Giacinto
984366d3a5 Consider provides during upgrades 2020-11-05 20:52:02 +01:00
Ettore Di Giacinto
39bc74fc73 Add boltDB test and fixup range over interface cast 2020-10-29 16:32:13 +01:00
Ettore Di Giacinto
e459ddf470 Optimize BoltDB World() call 2020-10-29 16:32:13 +01:00
Ettore Di Giacinto
9cb290b484
Improve database errors 2020-04-30 20:44:34 +02:00
Ettore Di Giacinto
8e91c255a3
Make FindPackageMatch match packages HumanReadableString 2020-04-19 10:47:55 +02:00
Ettore Di Giacinto
77ba4193aa
Add ValidateSelector to versioner interface and consume it
We can refactor furthermore by dropping the package methods, as now we
can consume a versioner in all places that requires it
2020-04-05 15:52:16 +02:00
Ettore Di Giacinto
84625be9ac
Adapt package.Best to take a Versioner interface 2020-04-04 15:33:14 +02:00
Ettore Di Giacinto
5e31d940f0
Introduce Packages for []Package 2020-04-04 14:29:08 +02:00
Daniele Rondina
c7652c8a70 Added labels to package definition
* cmd/search: Add support for search of the packages
  with a specific label.

* review Search method of Repositories for permit
  different search modes.

* labels are k/v attributes and could be matched
  through label key (with HasLabel method) or through
  regex that use "$key" + "=" + "$value"
2020-03-21 19:24:27 +01:00
Daniele Rondina
4dffc658db
database_boltdb: Align review of version comparision logic 2020-01-01 13:43:21 +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
69be9a2dd1
Add FindPackageVersions to DB 2019-12-13 17:18:26 +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
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
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
Ettore Di Giacinto
b32a6c2286
Wrap errors 2019-11-04 17:13:53 +01:00
Ettore Di Giacinto
4fbe84b30b
Support concurrency in InMemoryDB and reach feature parity with boltdb 2019-11-02 17:56:43 +01:00
Ettore Di Giacinto
ef1d0e5573
Make also deps recalculation concurrent 2019-11-01 16:26:11 +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