rpm-ostree
rpm-ostree copied to clipboard
daemon: RPM importer should respect compose settings
Right now the RPM import steps happening at compose time can be configured in several ways through the treefile. The same import steps are also performed by the daemon when installing a package on top of an existing deployment. However, in the latter case the RPM importer uses a default configuration which may or may not match the one that was specified in the treefile of the underlying deployment. It would be good to close the gap and make sure that the daemon uses the same import configuration, instead of blindly sticking to the defaults.
For reference, this is where the core derive the importer configuration from the treefile: https://github.com/coreos/rpm-ostree/blob/730bec87b129354ce2f43569fd5257bf249e63d1/src/libpriv/rpmostree-core.cxx#L2416
And this is where the daemon ends up using the importer defaults: https://github.com/coreos/rpm-ostree/blob/730bec87b129354ce2f43569fd5257bf249e63d1/src/daemon/rpmostreed-transaction-types.cxx#L570
Well. This is an interesting topic. The thing is, today people may actually be relying on the status quo. The classic example here is that in FCOS we do documentation: false
. But some users actually may want to get the docs for packages they layer.
Indeed. More generally I think that before doing this we will need to add at least two more treefile-related primitives:
- per-package knobs in the treefile for each importer configuration flag (e.g. "docs=true only on package xyz")
- a way for the client/daemon to override existing treefile settings (e.g. "docs=false in treefile, but client is asking for docs=true for package xyz"). This is strongly related to https://github.com/coreos/rpm-ostree/issues/2326) and will also need to be persisted somewhere.