aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xemi13
1 files changed, 9 insertions, 4 deletions
diff --git a/emi b/emi
index 207f471..e0cbe21 100755
--- a/emi
+++ b/emi
@@ -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 {