aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Ulri.pm
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2022-11-13 18:39:34 +0000
committerPascal Terjan <pterjan@mageia.org>2023-01-19 20:20:50 +0000
commitcfcd4507544f1c57802925255ecdfb9234f1feee (patch)
tree22c9ec1a0d5005aaa148c85fa772acf197b143e1 /lib/Iurt/Ulri.pm
parent70c540ae9f2c4f395712726a08b0db6365b2044d (diff)
downloadiurt-0.8.0.tar
iurt-0.8.0.tar.gz
iurt-0.8.0.tar.bz2
iurt-0.8.0.tar.xz
iurt-0.8.0.zip
Increase robustness when scp fails0.8.0
Do not remove lock file and mark build as done until we copied all the files.
Diffstat (limited to 'lib/Iurt/Ulri.pm')
-rwxr-xr-xlib/Iurt/Ulri.pm8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Iurt/Ulri.pm b/lib/Iurt/Ulri.pm
index 6d4e38f..f2e014c 100755
--- a/lib/Iurt/Ulri.pm
+++ b/lib/Iurt/Ulri.pm
@@ -12,6 +12,7 @@ use strict;
our @EXPORT = qw(
build_package
+ fetch_logs_and_cleanup
warn_about_failure
);
@@ -144,6 +145,13 @@ sub get_pid_from_file {
$pid;
}
+sub fetch_logs_and_cleanup {
+ my ($remote, $remote_dir, $target_dir) = @_;
+ make_path($target_dir);
+ sget($remote, "$remote_dir/log/*", $target_dir);
+ ssh($remote, "rm -rf $remote_dir");
+}
+
sub warn_about_failure {
my ($config, $user, $ent, $arch, $fail_dir, $path, $prefix) = @_;
my $text = join("\n", "Build of the following packages failed:\n", map { "- $_" } @{$ent->{srpms}}) . "\n";