From 12a3b16e4272911a11a9bc30ce3b8677a50bfd1c Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 22 Aug 2014 16:47:35 +0200 Subject: [PATCH] Introduce "broken" var to skip building broken packages; make "nocross" not error out. - broken var simply exits (without error) and skips building a pkg. - nocross var now simply exits without an error, to make buildbot continue building pkgs. --- Manual.md | 4 +++- common/environment/setup/sourcepkg.sh | 2 +- common/xbps-src/shutils/common.sh | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Manual.md b/Manual.md index 7a98baeeca4..35b8174f492 100644 --- a/Manual.md +++ b/Manual.md @@ -384,7 +384,7 @@ by all supported architectures. - `nostrip` If set, the ELF binaries with debugging symbols won't be stripped. By default all binaries are stripped. -- `nocross` If set, cross compilation won't be allowed and will exit with an error. +- `nocross` If set, cross compilation won't be allowed and will exit immediately. - `python_versions` A white space seperated list of python versions which will be used to build that package. This is only used by the `python-module` build style. @@ -393,6 +393,8 @@ be used to build that package. This is only used by the `python-module` build st to override the guessed list. Only use this if a specific order of subpackages is required, otherwise the default would work in most cases. +- `broken` If set, building the package won't be allowed because its state is currently broken. + ### build style scripts The `build_style` variable specifies the build method to build and install a diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh index eccd770a562..508a80dbe7d 100644 --- a/common/environment/setup/sourcepkg.sh +++ b/common/environment/setup/sourcepkg.sh @@ -3,7 +3,7 @@ ## VARIABLES unset -v pkgname version revision short_desc homepage license maintainer -unset -v only_for_archs distfiles checksum build_style nonfree nocross +unset -v only_for_archs distfiles checksum build_style nonfree nocross broken unset -v configure_script configure_args wrksrc build_wrksrc create_wrksrc unset -v make_cmd make_build_args make_install_args make_build_target make_install_target python_versions unset -v patch_args disable_parallel_build keep_libtool_archives diff --git a/common/xbps-src/shutils/common.sh b/common/xbps-src/shutils/common.sh index b7a3fc2ce2a..a3cbe5bde0e 100644 --- a/common/xbps-src/shutils/common.sh +++ b/common/xbps-src/shutils/common.sh @@ -389,7 +389,11 @@ setup_pkg() { fi if [ "$cross" -a "$nocross" ]; then - msg_error "$pkgver: cannot be cross compiled, exiting...\n" + msg_red "$pkgver: cannot be cross compiled, exiting...\n" + exit 0 + elif [ "$broken" ]; then + msg_red "$pkgver: cannot be built, it's currently broken; exiting...\n" + exit 0 fi }