Skip to content

Commit

Permalink
singlejob takes a package name as parameter
Browse files Browse the repository at this point in the history
and just builds this one enforced with verbose output
  • Loading branch information
adrianschroeter committed Apr 24, 2021
1 parent a27a5a9 commit 87e0316
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions PBuild/Checker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ recheck_package:
my ($status, $error) = check($ctx, $p, $incycle);
#printf("%s -> %s%s", $packid, $status, $error && $status ne 'scheduled' ? " ($error)" : '');
if ($status eq 'scheduled') {
next if $ctx->{'singlejob'} && $ctx->{'singlejob'} ne $packid;
my $builder;
for (@$builders) {
next if $_->{'job'};
Expand Down
4 changes: 3 additions & 1 deletion PBuild/Options.pm
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ my %known_options = (
'no-clean' => 'noclean',
'nochecks' => 'nochecks',
'no-checks' => 'nochecks',
'singlejob' => 'singlejob',
'singlejob' => 'singlejob:',
'shell' => 'shell',
'shell-after-fail' => 'shell-after-fail',
'arch' => 'arch:',
Expand Down Expand Up @@ -184,6 +184,8 @@ sub parse_options {
$opts{'singlejob'} = 1;
$opts{'buildjobs'} = 1;
}
# enforce the rebuild of the singlejob build
$opts{'rebuild-pkg'} = $opts{'singlejob'} if $opts{'singlejob'};

return (\%opts, @back);
}
Expand Down
1 change: 1 addition & 0 deletions pbuild
Original file line number Diff line number Diff line change
Expand Up @@ -418,6 +418,7 @@ while (1) {
$runs++;
$ctx->{'buildconfig'} = $buildconfig;
$ctx->{'lastcheck'} = \%lastcheck;
$ctx->{'singlejob'} = $opts->{'singlejob'} if $opts->{'singlejob'};

# check status of all packages
my $result = $ctx->pkgcheck(\@builders, @pkgs);
Expand Down

0 comments on commit 87e0316

Please sign in to comment.