Description of problem: The %packages directive in kickstart has a number of options [1]: %packages [--excludedocs] [--ignoremissing] [--nobase] [--nocore] [--ignoredeps] [--resolvedeps] [--default] [--instLangs INSTLANGS] [--multilib] [--excludeWeakdeps] The kickstart template in Beaker [2] does not have a way to use any of the options. It just sets --ignoremissing automatically, and adds --default if there's no recipe or packages list in the ks_meta: %packages --ignoremissing {%- if not recipe and packages is undefined %} --default {% else %} {% snippet 'rhts_packages' %} {% endif %} Please add a method to allow use of the other options to the %packages directive. [1] http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#chapter-7-package-selection [2] https://git.beaker-project.org/cgit/beaker/tree/Server/bkr/server/kickstarts/default#n73 Version-Release number of selected component (if applicable): beaker-23.2
If I'm reading the Jinja2 template correctly, I think a one-line patch to add a "pkgoptions" variable to the kickstart metadata should do the trick: diff --git a/Server/bkr/server/kickstarts/default b/Server/bkr/server/kickstarts/default index e937945e92d4..c4d72d87f930 100644 --- a/Server/bkr/server/kickstarts/default +++ b/Server/bkr/server/kickstarts/default @@ -70,7 +70,7 @@ unsupported_hardware {% endif %} {% if has_rpmostree is not defined %} -%packages --ignoremissing +%packages {{ pkgoptions|default('--ignoremissing') }} {%- if not recipe and packages is undefined %} --default {% else %} Example usage: <recipe ks_meta="pkgoptions='--excludedocs --ignoremissing'" ....>
Created attachment 1212631 [details] pkgoptions patch This patch adds the pkgoptions kickstart metadata variable plus an integration test and documentation. I'm having difficulty setting up a development environment in order to actually run the integration tests, however, so the patch is just a proof of concept at this time. If somebody with a development environment already set up can run a sanity test on my patch, I would appreciate it.
I got my devel environment fixed up with help from Dan Callaghan, Matt Jia, and Nick Coghlan -- thanks all! -- and verified the patch is working with an added test in the kickstart integration tests. The patch is in gerrit: https://gerrit.beaker-project.org/5346
BTW Jeff why did you need this? Which option do you want to pass down to %packages? Just curious.
Michal Kolar (CC'ed on this bug) asked for help on IRC for using the --instLangs option with the %packages section.
Beaker 24.0 has been released.