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.
When depending on those package otherwise we try to compile the full
tree instead of reconstrucing the image which is result of a join while
keeping the revdep tree invariate
This changeset allows to have shared templates in a static folder
"templates" present in each luet tree. If the directory is present, it
gets scanned and templated accordingly on top of each package. This
allows to use such folder to store custom blocks to share between
packages.
This is still experimental and subject to change, this is just a first
pass version to provide the feature. It needs to be refined still as it
would be more elegant to use the helm engine properly and map our
structure to the engine instead of adapting it roughly.
Fixes#224
* 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>
- Interpolates values from the repositories compilespec if present
- Automatically merge cache images coming from specified repository when
necessary
Fixes#194
Collections, similarly to packages, have a `build.yaml` and
a `finalize.yaml` that are templated for each package.
They have a `collection.yaml` containing a list of
packages that are part of the tree.
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>