action: mmdebstrap: Add include option

Add include option for mmdebstrap.
The include option of mmdebstrap specifies the packages to be installed during
bootstrap image.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@toshiba.co.jp>
This commit is contained in:
Nobuhiro Iwamatsu
2025-02-12 15:38:03 +09:00
committed by Nicolai Buchwitz
parent b58fb75f5e
commit 6a56ddbf6d

View File

@@ -15,6 +15,7 @@ and this may lead to incorrect configuration when becoming part of the created r
variant: "name"
keyring-packages:
keyring-files:
include:
Mandatory properties:
@@ -39,6 +40,8 @@ Example:
- merged-usr -- use merged '/usr' filesystem, fallback to distribution default if not set.
- include -- list of packages to install during bootstrap.
*/
package actions
@@ -61,6 +64,7 @@ type MmdebstrapAction struct {
KeyringFiles []string `yaml:"keyring-files"`
Components []string
MergedUsr *bool `yaml:"merged-usr"`
Include []string
}
func NewMmdebstrapAction() *MmdebstrapAction {
@@ -144,6 +148,11 @@ func (d *MmdebstrapAction) Run(context *debos.DebosContext) error {
cmdline = append(cmdline, fmt.Sprintf("--variant=%s", d.Variant))
}
if d.Include != nil {
s := strings.Join(d.Include, ",")
cmdline = append(cmdline, fmt.Sprintf("--include=%s", s))
}
cmdline = append(cmdline, d.Suite)
cmdline = append(cmdline, context.Rootdir)