From 2339521146cdbae5f43798cf9a3461f7cf0abade Mon Sep 17 00:00:00 2001 From: Gustavo De Nardin Date: Sat, 24 Mar 2007 11:36:52 +0000 Subject: - moved hack for verbosity to start of code, with a remark - removed double $path from debug string --- lib/Youri/Submit/Action/Archive.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Youri/Submit/Action/Archive.pm') diff --git a/lib/Youri/Submit/Action/Archive.pm b/lib/Youri/Submit/Action/Archive.pm index ef3c326..e902d76 100644 --- a/lib/Youri/Submit/Action/Archive.pm +++ b/lib/Youri/Submit/Action/Archive.pm @@ -30,6 +30,8 @@ sub run { my ($self, $package, $repository, $target, $define) = @_; croak "Not a class method" unless ref $self; + # FIXME: workaround for $self->{_verbose} not being initialized properly + $self->{_verbose} = 1; # all this should be in Mandriva_upload.pm my $section = $repository->_get_section($package, $target, $define); my $main_section = $repository->_get_main_section($package, $target, $define); @@ -39,14 +41,13 @@ sub run { my $path = $arch eq 'src' ? "$target/SRPMS" : "$target/$arch/media"; $path = "$repository->{_install_root}/$path"; $path =~ s,/+,/,g; - $self->{_verbose} = 1; foreach my $replaced_package ( $repository->get_replaced_packages($package, $target, $define) ) { my $file = $replaced_package->get_file(); my ($rep_section, $rep_main_section) = $file =~ m,$path/(([^/]+)/.*)/[^/]+.rpm,; # We do accept duplicate version for other submedia of the same main media section - print "(path $path) file $file section $rep_section main_section $rep_main_section ($path)\n" if $self->{_verbose}; + print "(path '$path') file '$file' section '$rep_section' main_section '$rep_main_section'\n" if $self->{_verbose}; next if $rep_main_section eq $main_section && $rep_section ne $section; my $dest = $repository->get_archive_dir($package, $target, $define); -- cgit v1.2.1