Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce buildflag nochecks #1013

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions PBuild/Job.pm
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@ sub createjob {
}

push @args, '--clean' unless $opts->{'noclean'};
push @args, '--checks' if $opts->{'checks'};
push @args, '--nochecks' if $opts->{'nochecks'};
push @args, '--shell' if $opts->{'shell'};
push @args, '--shell-after-fail' if $opts->{'shell-after-fail'};
Expand Down
1 change: 1 addition & 0 deletions PBuild/Options.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ my $pbuild_options = {
'reponame' => ':',
'noclean' => '',
'no-clean' => 'noclean',
'checks' => '',
'nochecks' => '',
'no-checks' => 'nochecks',
'arch' => ':',
Expand Down
8 changes: 6 additions & 2 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ BUILD_OPTIONS_PARSED=
DO_INIT=true
DO_INIT_TOPDIR=true
DO_LINT=
DO_CHECKS=true
DO_CHECKS=
CLEAN_BUILD=
GENBUILDREQS_CLEAN_BUILD=
RECIPEFILES=()
Expand Down Expand Up @@ -1065,6 +1065,9 @@ while test -n "$1"; do
test "$DO_INIT" = false && DO_INIT_TOPDIR=false
DO_INIT=false
;;
-checks)
DO_CHECKS=true # default, but to overwrite possible config setting
;;
-nochecks|-no-checks)
DO_CHECKS=false
;;
Expand Down Expand Up @@ -1377,7 +1380,6 @@ test "$CONFIG_DIR" != "$BUILD_DIR/configs" && validate_param "--configdir" "$CON
# validate the buildroot
validate_buildroot "$BUILD_ROOT"


if test -n "$VM_TYPE" -a -z "$RUNNING_IN_VM" ; then
vm_verify_options
vm_set_defaults
Expand Down Expand Up @@ -1416,6 +1418,8 @@ if test -n "$SEND_SYSRQ" ; then
cleanup_and_exit
fi

recipe_checks_config

# done option parsing
BUILD_OPTIONS_PARSED=true

Expand Down
10 changes: 10 additions & 0 deletions build-recipe
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,16 @@ recipe_build_time_statistics() {
fi
}

recipe_checks_config() {
if test -z "$DO_CHECKS"; then
local nochecks=$(queryconfig \
--dist "$BUILD_DIST" --configdir "$CONFIG_DIR" \
--archpath "$BUILD_ARCH" buildflags nochecks
)
test -n "$nochecks" && DO_CHECKS=false || DO_CHECKS=true
fi
}

recipe_gendiff() {
local obsgendiff=$(queryconfig \
--dist "$BUILD_DIST" --configdir "$CONFIG_DIR" \
Expand Down
6 changes: 6 additions & 0 deletions build.1
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ A shell script used to generate a Collax binary package.
.B --clean
Remove the build system and reinitialize it from scratch.
.TP
.B --checks
Run checks during build (default).
.TP
.B --no-checks
Don't run checks during build.
.TP
.B --no-init
Skip the build system initialization and start with build immediately.
.TP
Expand Down
2 changes: 2 additions & 0 deletions pbuild.1
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ the package.
.TP
.B "\-\-xen, \-\-kvm, ..."
.TP
.B "\-\-checks"
.TP
.B "\-\-no-checks"
.TP
.B "\-\-no-clean"
Expand Down
Loading