diff options
Diffstat (limited to 'scripts/build-vyos-image')
-rwxr-xr-x | scripts/build-vyos-image | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/build-vyos-image b/scripts/build-vyos-image index efe11af4..3d387a15 100755 --- a/scripts/build-vyos-image +++ b/scripts/build-vyos-image @@ -447,14 +447,22 @@ if __name__ == "__main__": --security true \ --backports true \ --apt-recommends false \ - --apt-options "--yes -oAPT::Default-Release="{{release_train}}" -oAPT::Get::allow-downgrades=true" \ + --apt-options "--yes -oAPT::Get::allow-downgrades=true" \ --apt-indices false "${@}" """) - lb_config_command = lb_config_tmpl.render(build_config) + ## Pin release for VyOS packages + apt_pin = f"""Package: * +Pin: release n={build_config['release_train']} +Pin-Priority: 600 +""" + + with open(f'../data/live-build-config/archives/vyos.pref.chroot', 'w') as f: + f.write(apt_pin) + print("I: Configuring live-build") if debug: @@ -471,6 +479,11 @@ if __name__ == "__main__": print("I: dry-run, not starting image build") sys.exit(0) + ## Add local packages + local_packages = glob.glob('../packages/*.deb') + if local_packages: + for f in local_packages: + shutil.copy(f, 'config/packages.chroot/' + os.path.basename(f)) ## Build the image print("I: Starting image build") |