aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo De Nardin <spuk@mandriva.org>2007-03-24 11:36:52 +0000
committerGustavo De Nardin <spuk@mandriva.org>2007-03-24 11:36:52 +0000
commit2339521146cdbae5f43798cf9a3461f7cf0abade (patch)
tree07175bf00d7f07fcec13713717c6abe53cc05f5c
parent1fa06b624c0576b0b102fb4617ae15e8d993fb09 (diff)
downloadmga-youri-submit-2339521146cdbae5f43798cf9a3461f7cf0abade.tar
mga-youri-submit-2339521146cdbae5f43798cf9a3461f7cf0abade.tar.gz
mga-youri-submit-2339521146cdbae5f43798cf9a3461f7cf0abade.tar.bz2
mga-youri-submit-2339521146cdbae5f43798cf9a3461f7cf0abade.tar.xz
mga-youri-submit-2339521146cdbae5f43798cf9a3461f7cf0abade.zip
- moved hack for verbosity to start of code, with a remark
- removed double $path from debug string
-rw-r--r--lib/Youri/Submit/Action/Archive.pm5
1 files changed, 3 insertions, 2 deletions
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);