Page MenuHomeVyOS Platform

vyos-build: Fail package build if patch cannot be applied
Closed, ResolvedPublicBUG

Description

Currenlty if patch cannot be applied by build.sh, it failes silently because of

try:
    build_cmd = package.get('build_cmd', 'dpkg-buildpackage -uc -us -tc -F --source-option=--tar-ignore=.git --source-option=--tar-ignore=.github')
    run(build_cmd, cwd=repo_dir, check=True, shell=True)
except CalledProcessError as e:
    print(e)
    print("I: Source packages build failed, ignoring - building binaries only")
    build_cmd = package.get('build_cmd', 'dpkg-buildpackage -uc -us -tc -b')
    run(build_cmd, cwd=repo_dir, check=True, shell=True)

This easily leads to confusion especially when upgrading packages: some of patches may fail and noone notices.

Suggestion: make this an error and recheck that all packages can be built with all patches without problems.

Details

Version
Rolling
Is it a breaking change?
Perfectly compatible
Issue type
Internal change (not visible to end users)