Isolate common code into a function and also fix a sublte bug hiding in
that code.
We need to stab a copy of the package inside our PackageMap to avoid
having symlinks pointing at the same values when iterating over
requires. ( e.g. happened in this case:
https://github.com/rancher-sandbox/cOS-toolkit/pull/467#issuecomment-895060115
)
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`.
When we cycle, we don't necessarly have all the packages into the DB
yet.
With this change, luet annotates the reverse dependency without any version, and we try to
update revdeps table when new items gets added, by checking the version
required in the selector.
Thanks to @joostruis for noticing the issue
* 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"
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.
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.
Unmarshalling needs well-defined structs, also swap pointers in few places where needed.
There are few more TODOS pending (like getting UpdatePackage fixed properly)
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>