diff options
author | Gustavo De Nardin <spuk@mandriva.org> | 2007-03-23 20:30:54 +0000 |
---|---|---|
committer | Gustavo De Nardin <spuk@mandriva.org> | 2007-03-23 20:30:54 +0000 |
commit | 97ffadf0680a41b18d079280b3b900b14c1317a0 (patch) | |
tree | d413e139b8587b49e94559b9848c8ca45548eb41 /lib/Youri/Repository | |
parent | 6f707a28decea6635e9a5186103c7d6155653728 (diff) | |
download | mga-youri-core-97ffadf0680a41b18d079280b3b900b14c1317a0.tar mga-youri-core-97ffadf0680a41b18d079280b3b900b14c1317a0.tar.gz mga-youri-core-97ffadf0680a41b18d079280b3b900b14c1317a0.tar.bz2 mga-youri-core-97ffadf0680a41b18d079280b3b900b14c1317a0.tar.xz mga-youri-core-97ffadf0680a41b18d079280b3b900b14c1317a0.zip |
- define and use $file
- added a debugging message when being verbose
- changed tabs for spaces
Diffstat (limited to 'lib/Youri/Repository')
-rw-r--r-- | lib/Youri/Repository/Mandriva_upload.pm | 7 |
1 files changed, 5 insertions, 2 deletions
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" |