Insert distribution into packages sources

This commit is contained in:
Jan Schär 2024-06-21 18:16:12 +02:00
parent af95999762
commit 6419fa917e
2 changed files with 5 additions and 2 deletions

View file

@ -165,6 +165,9 @@ def main():
# so we need to copy them somewhere else and restore them after the install.
for listpath in pathlib.Path('config/archives').glob('*.list.chroot'):
run(["cp", str(listpath), f"config/includes.chroot/usr/local/share/target-sources/{listpath.name.removesuffix('.chroot')}"])
# Insert distribution into source configs.
for sourcepath in pathlib.Path('config/includes.chroot/usr/local/share/target-sources').glob('*'):
edit_file(sourcepath, lambda s: s.replace("@DISTRIBUTION@", DISTRIBUTION))
elif args.variant == "contestant":
# Insert root password into hook script.
edit_file("config/hooks/live/2010-contestant.hook.chroot",