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 | |
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.
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | lib/Iurt/Emi.pm | 10 |
2 files changed, 9 insertions, 3 deletions
@@ -1,3 +1,5 @@ +- emi: skip all posts for non finishers instead of hardcoding a list + 0.6.27 - emi: fix a bug where genhdlist2 was skipped when doing a secondary upload containing a noarch at the same time as some other uploads 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"); |