Merge pull request #797 from c-po/fix-T3303

T3303: fix location of os-release file
This commit is contained in:
Christian Breunig 2024-10-07 17:27:17 +02:00 committed by GitHub
commit c1fc21a0ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -452,8 +452,7 @@ if __name__ == "__main__":
# Multi line strings needs to be un-indented to not have leading # Multi line strings needs to be un-indented to not have leading
# whitespaces in the resulting file # whitespaces in the resulting file
os_release = f""" os_release = f"""PRETTY_NAME="VyOS {version} ({build_config['release_train']})"
PRETTY_NAME="VyOS {version} ({build_config['release_train']})"
NAME="VyOS" NAME="VyOS"
VERSION_ID="{version}" VERSION_ID="{version}"
VERSION="{version} ({build_config['release_train']})" VERSION="{version} ({build_config['release_train']})"
@ -484,8 +483,8 @@ if __name__ == "__main__":
print("Version: {0}".format(version), file=f) print("Version: {0}".format(version), file=f)
# Define variables that influence to welcome message on boot # Define variables that influence to welcome message on boot
os.makedirs(os.path.join(chroot_includes_dir, 'usr/lib/'), exist_ok=True) os.makedirs(os.path.join(chroot_includes_dir, 'etc/'), exist_ok=True)
with open(os.path.join(chroot_includes_dir, 'usr/lib/os-release'), 'w') as f: with open(os.path.join(chroot_includes_dir, 'etc/os-release'), 'w') as f:
print(os_release, file=f) print(os_release, file=f)
## Clean up earlier build state and artifacts ## Clean up earlier build state and artifacts