diff options
author | Florent Villard <warly@mandriva.com> | 2006-10-23 14:02:16 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2006-10-23 14:02:16 +0000 |
commit | bed763df7ef626aa052675dd2c63d0453b34ea2f (patch) | |
tree | 6440b8559e774e30eb1021c0de2ed60d7835fc17 | |
parent | 17bf9d23b3ee9485567b6a27a78f8e7c3bab9e9b (diff) | |
download | iurt-bed763df7ef626aa052675dd2c63d0453b34ea2f.tar iurt-bed763df7ef626aa052675dd2c63d0453b34ea2f.tar.gz iurt-bed763df7ef626aa052675dd2c63d0453b34ea2f.tar.bz2 iurt-bed763df7ef626aa052675dd2c63d0453b34ea2f.tar.xz iurt-bed763df7ef626aa052675dd2c63d0453b34ea2f.zip |
use new youri command; do not unlink youri log for debugging purpose; fix user grabbing; check cache usage in log
-rwxr-xr-x | emi | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -133,7 +133,9 @@ foreach my $prefix (keys %pkg_tree) { $missing{$mandatory_arch} = 1; print {$run{LOG}} "no\n"; $ok = 0 - } + } else { + print {$run{LOG}} "yes (in cache)\n" + } } else { print {$run{LOG}} "yes\n" } @@ -141,13 +143,15 @@ foreach my $prefix (keys %pkg_tree) { if ($ok) { # upload my @packages; - my ($user) = $prefix =~ /\d{14}\.(\w+)\.\w+\.\d+_.*$/; + my ($user) = $prefix =~ /\d{14}\.(\w+)\.\w+\.\d+$/; foreach my $rpm (@{$pkg_tree{$prefix}{rpms}}) { push @packages, "$done/$path/${prefix}_$rpm" } - my $command = "/usr/bin/sudo -H -u $config->{upload_user} /usr/bin/perl -I/usr/local/lib/perl/ /usr/local/bin/youri-upload --verbose --config /etc/youri/upload-queue.conf --define user=$user --define prefix=$prefix --define section=$section $target @packages &> $done/$path/$prefix.youri"; + $user ||= $config->{upload_user}; + my $command = "/usr/bin/sudo -H -u $config->{upload_user} /usr/bin/perl -I/usr/local/lib/perl/ /usr/local/bin/youri-submit --verbose --config /etc/youri/submit-queue.conf --define user=$user --define prefix=$prefix --define section=$section $target @packages &> $done/$path/$prefix.youri"; print {$run{LOG}} "$program_name: running $command\n"; if (!system($command)) { + print {$run{LOG}} "$program_name: upload succeeded.\n"; # now check if we need to keep the current srpm in todo my $all_uploaded = 1; foreach my $arch (@{$config->{arch}}) { @@ -185,7 +189,8 @@ foreach my $prefix (keys %pkg_tree) { } # delete the files which should have heen either put in queue or rejected unlink $_ foreach @packages; - unlink "$done/$path/$prefix.youri"; + # keep the log file for debugging + # unlink "$done/$path/$prefix.youri"; # unlink the sources rpm, other arch will be able to grab it into the repository unlink "$todo/$path/${prefix}_$_" foreach @{$pkg_tree{$prefix}{srpms}} } else { |