From 2538c032e39870f933c62668f5bf6712229975fc Mon Sep 17 00:00:00 2001 From: Michael Schroeder Date: Wed, 11 May 2016 11:54:46 +0200 Subject: [PATCH] [backend] incompatible change: always put the local project in front of the config Lets see what product/image the commit breaks ;) --- src/backend/BSSched/BuildJob/KiwiImage.pm | 7 +++++-- src/backend/BSSched/BuildJob/KiwiProduct.pm | 5 ++++- src/backend/bs_repserver | 3 ++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/backend/BSSched/BuildJob/KiwiImage.pm b/src/backend/BSSched/BuildJob/KiwiImage.pm index 3f9352685e1..70cb42db42b 100644 --- a/src/backend/BSSched/BuildJob/KiwiImage.pm +++ b/src/backend/BSSched/BuildJob/KiwiImage.pm @@ -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"; @@ -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]; diff --git a/src/backend/BSSched/BuildJob/KiwiProduct.pm b/src/backend/BSSched/BuildJob/KiwiProduct.pm index f7cb41ce1d8..034caf24b1b 100644 --- a/src/backend/BSSched/BuildJob/KiwiProduct.pm +++ b/src/backend/BSSched/BuildJob/KiwiProduct.pm @@ -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"; diff --git a/src/backend/bs_repserver b/src/backend/bs_repserver index bff6b2ce48f..e6c28c5ef1a 100755 --- a/src/backend/bs_repserver +++ b/src/backend/bs_repserver @@ -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);