diff options
author | Christian Breunig <christian@breunig.cc> | 2024-02-24 14:17:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-24 14:17:51 +0100 |
commit | b5d545836916db82251354e8c12b1969d42bc1f7 (patch) | |
tree | a87a821471e899472e4eb89eb13f3e2563ebaa6a | |
parent | bcac2eb1f9b49cc15ebda65838e5465543dbb9c6 (diff) | |
parent | 273d624c68f8dafc7b299fb73e97aceb6f09e521 (diff) | |
download | vyos-build-b5d545836916db82251354e8c12b1969d42bc1f7.tar.gz vyos-build-b5d545836916db82251354e8c12b1969d42bc1f7.zip |
Merge pull request #508 from dmbaturin/T3664-chroot-path-sagitta
build: T3664: fix the includes_chroot path for Sagitta
-rwxr-xr-x | scripts/build-vyos-image | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/scripts/build-vyos-image b/scripts/build-vyos-image index afeed480..0f96cd68 100755 --- a/scripts/build-vyos-image +++ b/scripts/build-vyos-image @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -# Copyright (C) 2022 VyOS maintainers and contributors +# Copyright (C) 2022-2024 VyOS maintainers and contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 or later as @@ -331,7 +331,14 @@ if __name__ == "__main__": BUG_REPORT_URL="{build_defaults['bugtracker_url']}" """ - chroot_includes_dir = os.path.join(defaults.BUILD_DIR, defaults.CHROOT_INCLUDES_DIR) + # Switch to the build directory, this is crucial for the live-build work + # because the efective build config files etc. are there. + # + # All directory paths from this point must be relative to BUILD_DIR, + # not to the vyos-build repository root. + os.chdir(defaults.BUILD_DIR) + + chroot_includes_dir = defaults.CHROOT_INCLUDES_DIR vyos_data_dir = os.path.join(chroot_includes_dir, "usr/share/vyos") os.makedirs(vyos_data_dir, exist_ok=True) with open(os.path.join(vyos_data_dir, 'version.json'), 'w') as f: @@ -351,8 +358,11 @@ if __name__ == "__main__": print(os_release, file=f) - ## Switch to the build directory, this is crucial for the live-build work work - ## because the efective build config files etc. are there + # Switch to the build directory, this is crucial for the live-build work + # because the efective build config files etc. are there. + # + # All directory paths from this point must be relative to BUILD_DIR, + # not to the vyos-build repository root. os.chdir(defaults.BUILD_DIR) ## Clean up earlier build state and artifacts |