aboutsummaryrefslogtreecommitdiffstats
path: root/emi
diff options
context:
space:
mode:
Diffstat (limited to 'emi')
-rwxr-xr-xemi16
1 files changed, 15 insertions, 1 deletions
diff --git a/emi b/emi
index e0cbe21..e7fabe5 100755
--- a/emi
+++ b/emi
@@ -32,12 +32,14 @@ use Iurt::Config qw(config_usage get_date config_init dump_cache init_cache get_
use Iurt::Process qw(check_pid);
use Iurt::Mail qw(sendmail);
use Iurt::File qw(check_upload_tree);
+use Iurt::Util qw(plog_init plog);
use Data::Dumper;
my %run;
my $program_name = 'emi';
$run{program_name} = $program_name;
open(my $LOG, ">&STDERR");
+plog_init($program_name, $LOG);
$run{LOG} = $LOG;
my $HOME = $ENV{HOME};
@@ -118,6 +120,17 @@ check_upload_tree(\%run, $done,
},
);
+check_upload_tree(\%run, $todo,
+ sub {
+ my ($todo, $f, $m, $s, $r) = @_;
+ if ($r =~ /(\d{14}\.\w+\.\w+\.\d+)_(.*\.([^.]+)\.rpm)$/) {
+ my ($prefix, $rpm, $arch) = ($1, $2, $3);
+ print {$run{LOG}} "$program_name: found todo rpm $rpm ($prefix)\n";
+ push @{$pkg_tree{$prefix}{todo}}, $rpm
+ }
+ },
+);
+
foreach my $prefix (keys %pkg_tree) {
my $ok = 1;
my $target = $pkg_tree{$prefix}{target};
@@ -192,7 +205,8 @@ foreach my $prefix (keys %pkg_tree) {
# 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}}
+ print "unlink $todo/$path/${prefix}_$_\n" foreach @{$pkg_tree{$prefix}{todo}};
+ unlink "$todo/$path/${prefix}_$_" foreach @{$pkg_tree{$prefix}{todo}}
} else {
print {$run{LOG}} "WARNING $program_name: mandatory arch (", join(' ', keys %missing),") are missing for $prefix, waiting\n"
}