diff options
| author | Andrii Klymenko <a.klymenko@vyos.io> | 2026-09-07 18:41:53 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-07 18:41:53 +0300 |
| commit | 098dde1a06fc3bd588cfb3e277b7f0995bfef801 (patch) | |
| tree | 0051db11d3da9d4cdbdf9bbd136fa37695a6ebda /scripts | |
| parent | cf80f5db24dc37ef74e47dd7cc463035bbafe63a (diff) | |
| parent | b8e182138afddfe6a1d20a0aa5d543eca99058df (diff) | |
| download | vyos-build-098dde1a06fc3bd588cfb3e277b7f0995bfef801.tar.gz vyos-build-098dde1a06fc3bd588cfb3e277b7f0995bfef801.zip | |
Merge pull request #1295 from c-po/arm64-configtests
T9014: install flavor.json before Debian packages are installed
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/' |
