Skip to content

Commit

Permalink
Add more mmdebstrap opts
Browse files Browse the repository at this point in the history
Add mmdebstrap opts, see manpage

- aptopt
- mode
- keyrings
- dpkgopts

Signed-off-by: Charles Short <[email protected]>
  • Loading branch information
Charles Short committed Mar 24, 2024
1 parent fb1361a commit 5ca4059
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions ruck/stages/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"extract-hooks": {"type": "list"},
"customize-hooks": {"type": "list"},
"essential-hooks": {"type": "list"},
"aptopt": {"type": "list"},
"keyring": {"type": "list"},
"dpkgopts": {"type": "list"},
"mode": {"type": "string"},
},
}
}
Expand Down Expand Up @@ -110,5 +114,28 @@ def run(self):
cmd.extend([f"--essential-hook={hook}"
for hook in essential_hooks])

# Enable apt options.
apt_opts = self.options.get("apt-opts", None)
if apt_opts:
cmd.extend([f"--aptopt={hook}",
for hook in apt_opts])

# Enable mode option
mode = self.options.get("mode", None)
if mode:
cmd.extend([f"--mode={mode}"])

# Enable additional keyrings
keyrings = self.options.get("keyring", None)
if keyrings:
cmd.extend([f"--keyring={hook}",
for hook in keyrings])

# Enable dpkgopt
dpkg_opts = self.options.get("dpkgopt", None)
if dpkg_opts:
cmd.extend([f"--dpkgopts='{hook}'",
for hook in dpkg_opts])

cmd.extend([suite, target])
utils.run_command(cmd, cwd=self.workspace)

0 comments on commit 5ca4059

Please sign in to comment.