summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2022-10-11 11:43:31 -0500
committerGitHub <noreply@github.com>2022-10-11 11:43:31 -0500
commitb8111b4140ea2afefa16ea1fb7e632afe7ada7be (patch)
tree903c969bf8e7d364df017f233194f22968f01c43
parentce2a1975319b4755e2c58609861ed766743f1e84 (diff)
parentbe065d568b03f838d97a76c8cac80e6a8be6c01f (diff)
downloadvyos-build-b8111b4140ea2afefa16ea1fb7e632afe7ada7be.tar.gz
vyos-build-b8111b4140ea2afefa16ea1fb7e632afe7ada7be.zip
Merge pull request #268 from sarthurdev/current
build: T3664: Fix apt pinning file issue and use defaults for paths
-rwxr-xr-xscripts/build-vyos-image4
-rw-r--r--scripts/vyos_build_defaults.py2
2 files changed, 4 insertions, 2 deletions
diff --git a/scripts/build-vyos-image b/scripts/build-vyos-image
index 3d387a15..5d0248a0 100755
--- a/scripts/build-vyos-image
+++ b/scripts/build-vyos-image
@@ -460,7 +460,7 @@ Pin: release n={build_config['release_train']}
Pin-Priority: 600
"""
- with open(f'../data/live-build-config/archives/vyos.pref.chroot', 'w') as f:
+ with open(defaults.VYOS_PIN_FILE, 'w') as f:
f.write(apt_pin)
print("I: Configuring live-build")
@@ -483,7 +483,7 @@ Pin-Priority: 600
local_packages = glob.glob('../packages/*.deb')
if local_packages:
for f in local_packages:
- shutil.copy(f, 'config/packages.chroot/' + os.path.basename(f))
+ shutil.copy(f, os.path.join(defaults.LOCAL_PACKAGES_PATH, os.path.basename(f)))
## Build the image
print("I: Starting image build")
diff --git a/scripts/vyos_build_defaults.py b/scripts/vyos_build_defaults.py
index ac82dbc4..975fcb71 100644
--- a/scripts/vyos_build_defaults.py
+++ b/scripts/vyos_build_defaults.py
@@ -40,6 +40,8 @@ CHROOT_INCLUDES_DIR = 'config/includes.chroot'
ARCHIVES_DIR = 'config/archives/'
VYOS_REPO_FILE = 'config/archives/vyos.list.chroot'
+VYOS_PIN_FILE = 'config/archives/release.pref.chroot'
CUSTOM_REPO_FILE = 'config/archives/custom.list.chroot'
PACKAGE_LIST_FILE = 'config/package-lists/custom.list.chroot'
+LOCAL_PACKAGES_PATH = 'config/packages.chroot/'