Skip to content
Snippets Groups Projects
Unverified Commit 2b818e67 authored by Andrej Shadura's avatar Andrej Shadura
Browse files

aptly: Capture the output of the publisher’s subprocess


If we just die, the output is not actually captured by the calling
subroutine. We need to explicitly capture and bubble it up.

Use tee_merged instead of capture_merged to ensure the output is
captured in the logs immediately. The downside is that in case of
an error the output is logged twice.

Signed-off-by: Andrej Shadura's avatarAndrej Shadura <andrew.shadura@collabora.co.uk>
parent 6697651b
No related branches found
No related tags found
No related merge requests found
Pipeline #140064 passed
...@@ -2736,7 +2736,12 @@ sub publish { ...@@ -2736,7 +2736,12 @@ sub publish {
if ($repotype{'debian'}) { if ($repotype{'debian'}) {
my $aptly_config = BSAptly::aptly_repo_get_config($projid, $repoid); my $aptly_config = BSAptly::aptly_repo_get_config($projid, $repoid);
if ($aptly_config) { if ($aptly_config) {
BSAptly::aptly_update_repo($projid, $repoid, $aptly_config, $extrep) or die; my ($outerr, $result) = tee_merged {
return scalar BSAptly::aptly_update_repo($projid, $repoid, $aptly_config, $extrep);
};
if (!$result) {
die $outerr;
}
} elsif ($BSConfig::reprepository && $BSConfig::reprepository->{$prp}) { } elsif ($BSConfig::reprepository && $BSConfig::reprepository->{$prp}) {
updaterepo_reprepro($prp, $extrep, @changed); updaterepo_reprepro($prp, $extrep, @changed);
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment