mirror of
https://github.com/coreos/fedora-coreos-config.git
synced 2026-11-03 22:59:47 -09:00
build-rootfs: handle documentation: false
RHCOS builds with `documentation: false`. Let's pass that through to `bootc-base-imagectl` using the new `--no-docs` option. Aside: FCOS doesn't set `documentation: false` but effectively doesn't ship docs because it deletes all the directories manually. We should reconcile those two, but for now just try to match existing semantics.
This commit is contained in:
parent
ef22446801
commit
b90a690525
1 changed files with 5 additions and 2 deletions
|
|
@ -36,7 +36,8 @@ def main():
|
|||
|
||||
packages.extend(locked_nevras)
|
||||
overlays = gather_overlays(manifest)
|
||||
build_rootfs(target_rootfs, manifest_path, packages, overlays)
|
||||
nodocs = (manifest.get('documentation') is False)
|
||||
build_rootfs(target_rootfs, manifest_path, packages, overlays, nodocs)
|
||||
|
||||
inject_live(target_rootfs)
|
||||
inject_image_json(target_rootfs, manifest_path)
|
||||
|
|
@ -64,12 +65,14 @@ def get_treefile(manifest_path):
|
|||
return json.loads(data)
|
||||
|
||||
|
||||
def build_rootfs(target_rootfs, manifest_path, packages, overlays):
|
||||
def build_rootfs(target_rootfs, manifest_path, packages, overlays, nodocs):
|
||||
with tempfile.NamedTemporaryFile(mode='w') as argsfile:
|
||||
for pkg in packages:
|
||||
argsfile.write(f"--install={pkg}\n")
|
||||
for overlay in overlays:
|
||||
argsfile.write(f"--add-dir={overlay}\n")
|
||||
if nodocs:
|
||||
argsfile.write("--no-docs\n")
|
||||
argsfile.flush()
|
||||
cache_arg = ['--cachedir=/cache'] if os.path.isdir('/cache') else []
|
||||
subprocess.check_call(["/usr/libexec/bootc-base-imagectl",
|
||||
|
|
|
|||
Loading…
Reference in a new issue