diff options
author | Pascal Terjan <pterjan@gmail.com> | 2016-10-19 15:26:00 +0100 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2016-10-20 20:25:17 +0100 |
commit | 45e72c069afa78e2939d43f0a3cefe8012a93ba8 (patch) | |
tree | 967368d14e330d202251e71bc50c7fd26fc54c67 /lib | |
parent | c6dd4dca511b9f7d81d4f3d220c8dea6567746f1 (diff) | |
download | iurt-45e72c069afa78e2939d43f0a3cefe8012a93ba8.tar iurt-45e72c069afa78e2939d43f0a3cefe8012a93ba8.tar.gz iurt-45e72c069afa78e2939d43f0a3cefe8012a93ba8.tar.bz2 iurt-45e72c069afa78e2939d43f0a3cefe8012a93ba8.tar.xz iurt-45e72c069afa78e2939d43f0a3cefe8012a93ba8.zip |
Skip all posts when uploading a non finisher
This will make uploads much faster by only running
createrepo once per changed media, like genhdlist2.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Iurt/Emi.pm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Iurt/Emi.pm b/lib/Iurt/Emi.pm index 9e326e1..9e98125 100644 --- a/lib/Iurt/Emi.pm +++ b/lib/Iurt/Emi.pm @@ -136,10 +136,14 @@ sub upload_prefix_in_media { return unless @packages; $user ||= $config->{upload_user}; - # FIXME we want to skip all post, we should not hardcode them here - my $skip = $o_finish ? "" : "--skip-post genhdlist2 --skip-post mirror --skip-post clean_rpmsrate"; - my $command = "/usr/bin/perl -I/usr/share/mga-youri-submit/lib /usr/share/mga-youri-submit/bin/youri-submit --verbose --config /etc/youri/submit-upload.conf --define user=$user --define prefix=$prefix --define section=$media $skip $target @packages &> $done$path/$youri_file"; + my $base_command = "/usr/bin/perl -I/usr/share/mga-youri-submit/lib /usr/share/mga-youri-submit/bin/youri-submit --config /etc/youri/submit-upload.conf"; + my $all_posts = `$base_command --list posts $target`; + $all_posts =~ s/\n/ /g; + $all_posts =~ s/(^| +)/ --skip-post /g; + $all_posts =~ s/--skip-post *$//; + my $skip = $o_finish ? "" : $all_posts; + my $command = "$base_command --verbose --define user=$user --define prefix=$prefix --define section=$media $skip $target @packages &> $done$path/$youri_file"; plog('DEBUG', "running $command"); if (!system($command)) { plog('INFO', "upload succeeded"); |