aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Youri/Submit/Pre
diff options
context:
space:
mode:
authorMandrake <mandrake@mandriva.com>2006-10-26 11:14:07 +0000
committerMandrake <mandrake@mandriva.com>2006-10-26 11:14:07 +0000
commit1bb47f37da834b7bfc777ff3a6f8e8f9be26b385 (patch)
tree5327f9fa557bd6b56872b5884c042eaa9b185790 /lib/Youri/Submit/Pre
parent2a0eadca8aa1dfb547049d4d1a602d76b90f2de7 (diff)
downloadmga-youri-submit-1bb47f37da834b7bfc777ff3a6f8e8f9be26b385.tar
mga-youri-submit-1bb47f37da834b7bfc777ff3a6f8e8f9be26b385.tar.gz
mga-youri-submit-1bb47f37da834b7bfc777ff3a6f8e8f9be26b385.tar.bz2
mga-youri-submit-1bb47f37da834b7bfc777ff3a6f8e8f9be26b385.tar.xz
mga-youri-submit-1bb47f37da834b7bfc777ff3a6f8e8f9be26b385.zip
return correct packages table for groups
Diffstat (limited to 'lib/Youri/Submit/Pre')
-rw-r--r--lib/Youri/Submit/Pre/Rsync.pm18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/Youri/Submit/Pre/Rsync.pm b/lib/Youri/Submit/Pre/Rsync.pm
index 2867b22..7dd7487 100644
--- a/lib/Youri/Submit/Pre/Rsync.pm
+++ b/lib/Youri/Submit/Pre/Rsync.pm
@@ -43,26 +43,28 @@ sub run {
$self->{_error} = "Reading queue directory failed";
# now get the packages downloaded
my %packages;
- opendir my $queuedh, "$self->{_destination}/$target/" or return;
- opendir my $targetdh, $queue or return;
+ opendir my $queuedh, "$self->{_destination}/$target/" or return "Could not open $self->{_destination}/$target";
+ opendir my $targetdh, $queue or return "Could not open $queue";
my $idx;
foreach my $media (readdir $targetdh) {
$media =~ /^\.{1,2}$/ and next;
print "$target - $media\n";
if (-d "$queue/$media") {
- opendir my $submediadh, "$queue/$media" or return;
+ opendir my $submediadh, "$queue/$media" or return "Could not open $queue/$media";
foreach my $submedia (readdir $submediadh) {
$submedia =~ /^\.{1,2}$/ and next;
print "$target - $media - $submedia\n";
- opendir my $rpmdh, "$queue/$media/$submedia" or return;
+ opendir my $rpmdh, "$queue/$media/$submedia" or return "Could not open $queue/$media/$submedia";
foreach my $rpm (readdir $rpmdh) {
$rpm =~ /^\.{1,2}$/ and next;
print "$target - $media - $submedia : $rpm\n";
- if ($rpm =~ /^(\d{14}\.\w+\.\w+\.\d+)_.*\.\.rpm$/) {
- push @{$packages{$1}{rpms}}, { section => "$media/$submedia", file => "$queue/$media/$submedia/$rpm" };
+ my $file = "$queue/$media/$submedia/$rpm";
+ $file =~ s/\/+/\//g;
+ if ($rpm =~ /^(\d{14}\.\w+\.\w+\.\d+)_.*\.rpm$/) {
+ push @{$packages{$1}{rpms}}, { section => "$media/$submedia", file => $file };
} elsif ($rpm =~ /\.rpm$/) {
$idx++;
- push @{$packages{"independant_$idx"}{rpms}}, { section => "$media/$submedia", file => "$queue/$media/$submedia/$rpm" }
+ push @{$packages{"independant_$idx"}{rpms}}, { section => "$media/$submedia", file => $file }
}
}
}
@@ -71,7 +73,7 @@ sub run {
foreach my $key (keys %packages) {
push @$pre_packages, $packages{$key}{rpms}
}
- 1
+ return
}
=head1 COPYRIGHT AND LICENSE