Skip to content

Commit

Permalink
[backend] incompatible change: always put the local project in front …
Browse files Browse the repository at this point in the history
…of the config

Lets see what product/image the commit breaks ;)
  • Loading branch information
mlschroe committed May 11, 2016
1 parent a293bb1 commit 2538c03
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/backend/BSSched/BuildJob/KiwiImage.pm
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ sub check {

my @aprps = BSSched::BuildJob::expandkiwipath($info, $ctx->{'prpsearchpath'});
# get config from kiwi path
my $bconf = BSSched::ProjPacks::getconfig($gctx, $projid, $repoid, $myarch, \@aprps);
my @configpath = @aprps;
# always put ourselfs in front
unshift @configpath, "$projid/$repoid" unless @configpath && $configpath[0] eq "$projid/$repoid";
my $bconf = BSSched::ProjPacks::getconfig($gctx, $projid, $repoid, $myarch, \@configpath);
if (!$bconf) {
print " - $packid (kiwi-image)\n";
print " no config\n";
Expand Down Expand Up @@ -193,7 +196,7 @@ sub check {

sub build {
my ($self, $ctx, $packid, $pdata, $info, $data) = @_;
my $bconf = $data->[0];
my $bconf = $data->[0]; # this is the config used to expand the image packages
my $edeps = $data->[1];
my $reason = $data->[2];

Expand Down
5 changes: 4 additions & 1 deletion src/backend/BSSched/BuildJob/KiwiProduct.pm
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,10 @@ sub check {
if (!@{$repo->{'path'} || []}) {
# have no configured path, use repos from kiwi file instead
@bprps = @aprps;
$bconf = BSSched::ProjPacks::getconfig($gctx, $projid, $repoid, $myarch, \@bprps);
my @configpath = @aprps;
# always put ourselfs in front
unshift @configpath, "$projid/$repoid" unless @configpath && $configpath[0] eq "$projid/$repoid";
$bconf = BSSched::ProjPacks::getconfig($gctx, $projid, $repoid, $myarch, \@configpath);
if (!$bconf) {
print " - $packid (kiwi-product)\n";
print " no config\n";
Expand Down
3 changes: 2 additions & 1 deletion src/backend/bs_repserver
Original file line number Diff line number Diff line change
Expand Up @@ -2893,7 +2893,8 @@ sub getbuildinfo {
# a repo with no path will expand to just the prp as the only element
if ($kiwitype eq 'image' || @{$repo->{'path'} || []} < 2) {
@configpath = expandkiwipath($info, $repo);
unshift @configpath, "$projid/$repoid" unless @configpath;
# always put ourselfs in front
unshift @configpath, "$projid/$repoid" unless @configpath && $configpath[0] eq "$projid/$repoid";
}
}
my $bconf = getconfig($projid, $repoid, $arch, \@configpath);
Expand Down

0 comments on commit 2538c03

Please sign in to comment.