diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/image-build/build-vyos-image | 8 | ||||
| -rw-r--r-- | scripts/image-build/defaults.py | 3 |
2 files changed, 10 insertions, 1 deletions
diff --git a/scripts/image-build/build-vyos-image b/scripts/image-build/build-vyos-image index 40d9cfdf..ea8d2f4c 100755 --- a/scripts/image-build/build-vyos-image +++ b/scripts/image-build/build-vyos-image @@ -541,7 +541,13 @@ DOCUMENTATION_URL="{build_config['documentation_url']}" os.makedirs(vyos_data_dir, exist_ok=True) with open(os.path.join(vyos_data_dir, 'version.json'), 'w') as f: json.dump(version_data, f) - with open(os.path.join(vyos_data_dir, 'flavor.json'), 'w') as f: + # The flavor data is required by the maintainer scripts of the Debian + # packages we install, thus it must be in place before the packages are + # installed and not only afterwards + vyos_data_dir_early = os.path.join(defaults.CHROOT_INCLUDES_EARLY_DIR, + "usr/share/vyos") + os.makedirs(vyos_data_dir_early, exist_ok=True) + with open(os.path.join(vyos_data_dir_early, 'flavor.json'), 'w') as f: json.dump(flavor_data, f) with open(os.path.join(binary_includes_dir, 'version.json'), 'w') as f: json.dump(version_data, f) diff --git a/scripts/image-build/defaults.py b/scripts/image-build/defaults.py index 29a6d59f..be417ca1 100644 --- a/scripts/image-build/defaults.py +++ b/scripts/image-build/defaults.py @@ -62,6 +62,9 @@ PBUILDER_DIR = 'pbuilder' LB_CONFIG_DIR = 'config' CHROOT_INCLUDES_DIR = 'config/includes.chroot' +# Files that must already be present while the Debian packages are installed, +# live-build copies this directory into the chroot before package installation +CHROOT_INCLUDES_EARLY_DIR = 'config/includes.chroot_before_packages' BINARY_INCLUDES_DIR = 'config/includes.binary' ARCHIVES_DIR = 'config/archives/' |
