This command shows all installed packatges in the system directly
without having to query one by one.
It also allows to store the package list into a file
Signed-off-by: Itxaka <itxaka@kairos.io>
This refactors DefaultPackage into types.Package and gets rid of the
interface. This is a preceeding for a follow up where accessors will be
removed from the code.
It also does several cleanup, so we get rid also of some unneeded
dependencies.
This commit is multi-fold as it also refactors internally context and logger
as interfaces so it is easier to plug luet as a library externally.
Introduces a garbage collector (related to #227) but doesn't handle yet
parallelism.
Closes#265
It holds necessary state plus additional information relative to the
context which we are being run to (e.g. if we are in a terminal or not).
Besides in the future we can use it also as a contextual logger to
provide more smart logging capabilities.
This also replace the general global configuration instance that
previously was share between the core components.
Instead of merely storing files into disk use a real cache.
This also makes possible finally to reference artifacts in the cache with the
package checksum, which solves the cache hit checksum failures we had
previously.
docker.Untar
(https://github.com/mudler/luet/blob/master/vendor/github.com/docker/docker/pkg/archive/archive.go#L942) requires absolute paths.
We didn't do any input validation before, assuming the path passed by
were absolute since they were coming from YAML configuration files, now
that this is not the truth anymore we need to sanitize the input.
With this change we check if the given path is absolute or relative, if
it's relative we calculate the absolute path and use it in place.
- Allows to override the system db and create/remove entries as desired.
The input format is the same metadata as the one generated by the
artifacts. It contains the Package and the file list that we need.
- Add integration test
Closes#47