diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Youri/Upload/Pre/Rsync.pm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/Youri/Upload/Pre/Rsync.pm b/lib/Youri/Upload/Pre/Rsync.pm index 74167c1..991e657 100644 --- a/lib/Youri/Upload/Pre/Rsync.pm +++ b/lib/Youri/Upload/Pre/Rsync.pm @@ -58,20 +58,18 @@ sub run { foreach my $rpm (readdir $rpmdh) { $rpm =~ /^\.{1,2}$/ and next; print "$target - $media - $submedia : $rpm\n"; - if ($rpm =~ /^(\d{14}\.\w+\.\w+\.\d+)_.*\.rpm/) { - $packages{$1}{options}{section} = "$media/$submedia"; - push @{$packages{$1}{rpms}}, "$queue/$media/$submedia/$rpm"; + if ($rpm =~ /^(\d{14}\.\w+\.\w+\.\d+)_.*\.\.rpm$/) { + push @{$packages{$1}{rpms}}, { section => "$media/$submedia", file => "$queue/$media/$submedia/$rpm" }; } elsif ($rpm =~ /\.rpm$/) { $idx++; - $packages{"independant_$idx"}{options}{section} = "$media/$submedia"; - push @{$packages{"independant_$idx"}{rpms}}, "$queue/$media/$submedia/$rpm"; + push @{$packages{"independant_$idx"}{rpms}}, { section => "$media/$submedia", file => "$queue/$media/$submedia/$rpm" } } } } } } foreach my $key (keys %packages) { - push @$pre_packages, [ $packages{$key}{options}, $packages{$key}{rpms} ] + push @$pre_packages, $packages{$key}{rpms} } 1 } |