From 97ffadf0680a41b18d079280b3b900b14c1317a0 Mon Sep 17 00:00:00 2001 From: Gustavo De Nardin Date: Fri, 23 Mar 2007 20:30:54 +0000 Subject: - define and use $file - added a debugging message when being verbose - changed tabs for spaces --- lib/Youri/Repository/Mandriva_upload.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/Youri/Repository/Mandriva_upload.pm') diff --git a/lib/Youri/Repository/Mandriva_upload.pm b/lib/Youri/Repository/Mandriva_upload.pm index 0f41e85..fde4d19 100644 --- a/lib/Youri/Repository/Mandriva_upload.pm +++ b/lib/Youri/Repository/Mandriva_upload.pm @@ -279,12 +279,15 @@ sub _get_section { my $section = $user_context->{section}; my $media = $self->_get_media_config($target); my $arch = $package->get_arch(); + my $file = $package->as_file(); + $file =~ s,/+,/,g; # unneeded? + # FIXME: use $self->get_arch() $arch = $self->{_noarch} if $arch eq 'noarch'; $arch = $translate_arch{$arch} || $arch; if (!$section) { - my $file = $package->as_file(); - $section = $self->{packages}{$package->as_file()}{section} + $section = $self->{packages}{$file}{section}; + print "Section undefined, repository says it is '$section' for '$file'\n" if $self->{_verbose}; } if ($section && $section !~ /debug_/ && $package->is_debug()) { $section = "debug_$section" -- cgit v1.2.1