Skip to content

Commit

Permalink
[backend] put fullcache into fctx
Browse files Browse the repository at this point in the history
  • Loading branch information
mlschroe committed Feb 16, 2018
1 parent 73bc9ae commit b264088
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/backend/BSSched/BuildRepo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ package BSSched::BuildRepo;
# filter
# olduseforbuild
# newuseforbuild
# fullcache
#
# gctx usage
# arch
Expand Down Expand Up @@ -667,11 +668,12 @@ sub fctx_integrate_package_into_full_old {
=cut

sub move_into_full {
my ($fctx, $old, $new, $fullcache) = @_;
my ($fctx, $old, $new) = @_;

my $prp = $fctx->{'prp'};
my $gdst = $fctx->{'gdst'};
my $gctx = $fctx->{'gctx'};
my $fullcache = $fctx->{'fullcache'};
my $prpa = "$prp/$gctx->{'arch'}";
my $repodatas = $gctx->{'repodatas'};
my $pool;
Expand Down Expand Up @@ -862,13 +864,14 @@ sub checkuseforbuild {
'gdst' => $gdst,
'prp' => $prp,
'filter' => $filter,
'fullcache' => $fullcache,
};
if ($olduseforbuild) {
$fctx->{'olduseforbuild'} = \%olduseforbuild;
$fctx->{'newuseforbuild'} = \%newuseforbuild;
}
# this will also remove no longer existing packages from the :full tree
move_into_full($fctx, undef, undef, $fullcache);
move_into_full($fctx, undef, undef);
BSUtil::store("$gdst/.:full.useforbuild", "$gdst/:full.useforbuild", $newuseforbuild);
}

Expand Down
5 changes: 3 additions & 2 deletions src/backend/BSSched/BuildResult.pm
Original file line number Diff line number Diff line change
Expand Up @@ -514,13 +514,14 @@ sub update_dst_full {
'meta' => $meta,
'filter' => $filter,
'importarch' => $importarch,
'fullcache' => $fullcache,
};
if ($new_full_handling) {
BSSched::BuildRepo::move_into_full($fctx, \%old, \%new, $fullcache);
BSSched::BuildRepo::move_into_full($fctx, \%old, \%new);
} else {
$fctx->{'dst'} = $jobdir if $importarch; # override source dir for imports
# note that we use oldrepo here instead of \%old
BSSched::BuildRepo::move_into_full($fctx, $oldrepo, \%new, $fullcache);
BSSched::BuildRepo::move_into_full($fctx, $oldrepo, \%new);
}
}

Expand Down

0 comments on commit b264088

Please sign in to comment.