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.
Introduce an arch field that can be used to filter repositories based on
the local architecture.
If arch is provided and matching with the current GOARCH then the
repository is enabled
* Reduce possibility of circular dependency
Just by adding an import for bus to anything in the helper dir, we would
run into a circular dependency due to how things are structured. That
means that we cannot set any events for unpacking or docker helper
pulling an image.
This commit tries to work around this by doing several things.
- Remove full imports of the helper module by segmentating some modules
into their own submodule, like docker or match so just using a small match
function doesnt bring the whole module
- Removing a simple function to check if a dir exists from importing
the full helper module and instead write the function (5 lines)
- Using logrus in the bus module instead of logger, which avoids a
circular dependency
Signed-off-by: Itxaka <igarcia@suse.com>
* Add two new events for unpacking an image
Both pre and post unpacking an image
Signed-off-by: Itxaka <igarcia@suse.com>
We used to create dockerfiles blindly assuming there is content, but
that's not the case for virtual packages.
Due to https://github.com/moby/moby/issues/38039 we are forced for a
"unpleasant" workaround, as we can't create empty FROM scratch images
and export them.
Drop image-repository on create-repo. In case of a docker repository, --output is the image reference to use.
Also restore default output build dir.
See also: #169
* installer.LuetRepository is now installer.LuetSystemRepository,
a struct that extend config.LuetRepository
* config: system_repositories option is now "repositories".
This resolve viper issue.
* config: cache_repositories option is now "repetitors"
This resolve viper issue.
* cmd/*: Now use new config.LuetRepository
* cmd/search: now create local luet repository if database_engine
is equal to "boltdb"