Skip to content

Commit

Permalink
Merge pull request #7929 from mlschroe/master
Browse files Browse the repository at this point in the history
[backend] fix publishing of containers when no registry is configured
  • Loading branch information
mlschroe committed Jul 17, 2019
2 parents 36bda08 + 294d0c0 commit 02d5f76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/backend/BSPublisher/Container.pm
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ sub upload_all_containers {
}
for my $pp (sort keys %allrefs_pp_lastp) {
mkdir_p($extrep);
unlink("$extrep/$pp");
unlink("$extrep/$pp.registry.txt");
if (@{$allrefs_pp{$pp} || []}) {
unlink("$extrep/$pp");
# write readme file where to find the container
my @r = sort(BSUtil::unify(@{$allrefs_pp{$pp}}));
my $readme = "This container can be pulled via:\n";
Expand All @@ -291,6 +291,7 @@ sub upload_all_containers {
writestr("$extrep/$pp.registry.txt", undef, $readme);
} elsif ($multicontainer && $allrefs_pp_lastp{$pp} ne $pp) {
# create symlink to last arch
unlink("$extrep/$pp");
symlink("$allrefs_pp_lastp{$pp}", "$extrep/$pp");
}
}
Expand Down
1 change: 1 addition & 0 deletions src/backend/bs_publish
Original file line number Diff line number Diff line change
Expand Up @@ -2128,6 +2128,7 @@ sub publish {
} else {
print " + $p\n";
}
$containerinfo->{'blobdir'} = $blobdir if $blobdir;
BSPublisher::Container::reconstruct_container($containerinfo, "$extrep/$p");
my @s = stat("$extrep/$p");
$bins{$p} = undef;
Expand Down

0 comments on commit 02d5f76

Please sign in to comment.