diff options
author | Pascal Terjan <pterjan@gmail.com> | 2016-01-23 16:06:03 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2016-01-23 16:06:03 +0000 |
commit | 15fee06a85406c5f2e60fd927c22147031b3e68f (patch) | |
tree | 87d1177f3c8553ca905f7eb7e84422467501bfc3 | |
parent | 5c6a71c86c92ff7ddb08130a8c1f452932045d85 (diff) | |
download | iurt-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
-rwxr-xr-x | emi | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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$/) { |