Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
create/init: add init-time env vars and gate and define one for zyppe…
…r weak deps In case one really wants for recommended packages to stay disabled in an opensuse image, make it possible to control this with an environment variable. It's called DBX_CONTAINER_INIT_ZYPPER_NORECOMMENDS and must be defined to either 'false' (i.e., the default, as we do want recommended packages) or 'true'. The variable, if present, is defined inside the environment of the container. Then, in distrobox-init, we can check if it is there, and act accordingly. So, for keeping recommended packages out, something like this should be done: DBX_CONTAINER_INIT_ZYPPER_NORECOMMENDS=true distrobox create ... While there, implement this in a bit more of a generic way. Basically, all variables with a name that starts with DBX_CONTAINER_INIT_* that distrobox-create finds defined, are included in the environment of the container, so that distrobox-init can take advantage of them, to further customize things. This is somewhat similar to #220, but it's not really the same. In fact, there, a mechanism for user-provided and generic pre-init customization is advocated. This one can be used (and is, in the case of zypper's weak deps) for very specific changes. Note that, on openSUSE, the package 'parallel-printer-support' is explicitly locked out of installation. This is because the package, when installed, tries to creade device files (/dev/lp0, etc), which does not work for rootless podman. Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
- Loading branch information