aboutsummaryrefslogtreecommitdiffstats
path: root/emi
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2016-01-23 16:06:03 +0000
committerPascal Terjan <pterjan@gmail.com>2016-01-23 16:06:03 +0000
commit15fee06a85406c5f2e60fd927c22147031b3e68f (patch)
tree87d1177f3c8553ca905f7eb7e84422467501bfc3 /emi
parent5c6a71c86c92ff7ddb08130a8c1f452932045d85 (diff)
downloadiurt-15fee06a85406c5f2e60fd927c22147031b3e68f.tar
iurt-15fee06a85406c5f2e60fd927c22147031b3e68f.tar.gz
iurt-15fee06a85406c5f2e60fd927c22147031b3e68f.tar.bz2
iurt-15fee06a85406c5f2e60fd927c22147031b3e68f.tar.xz
iurt-15fee06a85406c5f2e60fd927c22147031b3e68f.zip
Store uploaded state of packages in pkg_tree
Diffstat (limited to 'emi')
-rwxr-xr-xemi9
1 files changed, 4 insertions, 5 deletions
diff --git a/emi b/emi
index 940481d..f7d1eaa 100755
--- a/emi
+++ b/emi
@@ -119,7 +119,6 @@ my $done = "$config->{queue}/done";
my $reject = "$config->{queue}/rejected";
my %pkg_tree;
-my %uploaded;
#
@@ -147,7 +146,7 @@ sub done_func {
my ($action) = $1;
if ($action eq 'upload') {
plog('DEBUG', "found already uploaded ($prefix)");
- $uploaded{$prefix}{$section} = 1;
+ $pkg_tree{$prefix}{section}{$section}{uploaded} = 1;
}
}
}
@@ -207,7 +206,7 @@ foreach my $prefix (sort keys %pkg_tree) {
plog('DEBUG', "... in $path");
- if ($uploaded{$prefix}{$section}) {
+ if ($pkg_tree{$prefix}{section}{$section}{uploaded}) {
plog('INFO', "package already uploaded for mandatory arches, proceeding");
next;
}
@@ -264,7 +263,7 @@ sub upload_prefix_in_section {
my ($user) = $prefix =~ /\d{14}\.(\w+)\.\w+\.\d+$/;
my $target = $pkg_tree{$prefix}{target};
my $youri_file = "$prefix.youri";
- if ($uploaded{$prefix}{$section}) {
+ if ($pkg_tree{$prefix}{section}{$section}{uploaded}) {
$youri_file .= "." . time();
}
@@ -273,7 +272,7 @@ sub upload_prefix_in_section {
plog('OK', "all mandatory archs done: $prefix");
foreach my $rpm (@{$pkg_tree{$prefix}{section}{$section}{rpms}}) {
my $rpmpath = "$done/$path/${prefix}_$rpm";
- if ($uploaded{$prefix}{$section}) {
+ if ($pkg_tree{$prefix}{section}{$section}{uploaded}) {
# if already uploaded for mandatory arches, do not try to upload again src or noarch packages
# but still remember these duplicate files for removal
if (my ($type) = $rpm =~ /\.(noarch|src)\.rpm$/) {