From 424a7f46e8070dc0bacb3bd7ecaf639977a6bcc0 Mon Sep 17 00:00:00 2001 From: Gustavo De Nardin Date: Fri, 7 Dec 2007 18:26:17 +0000 Subject: - make Sendcache send debug packages only if explicitly told to, to save space --- lib/Youri/Submit/Action/Sendcache.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Youri/Submit/Action/Sendcache.pm b/lib/Youri/Submit/Action/Sendcache.pm index 8d9cf94..ec988d1 100644 --- a/lib/Youri/Submit/Action/Sendcache.pm +++ b/lib/Youri/Submit/Action/Sendcache.pm @@ -3,7 +3,7 @@ package Youri::Submit::Action::Sendcache; =head1 NAME -Youri::Submit::Action::Send - upload package +Youri::Submit::Action::Sendcache - upload package to cache =head1 DESCRIPTION @@ -26,12 +26,13 @@ sub _init { ssh_key => '', verbose => '', root => '', + debug_pkgs => 0, @_ ); croak "undefined upload host" unless $options{uphost}; croak "undefined ssh key" unless $options{ssh_key}; - foreach my $var ('perms', 'user', 'uphost', 'ssh_key', 'verbose', 'root') { + foreach my $var ('perms', 'user', 'uphost', 'ssh_key', 'verbose', 'root', 'debug_pkgs') { $self->{"_$var"} = $options{$var}; } @@ -42,6 +43,9 @@ sub run { my ($self, $package, $repository, $target, $define) = @_; croak "Not a class method" unless ref $self; + # only cache debug packages if option debug_pkgs is true + return if ($package->is_debug() && !$self->{_debug_pkgs}); + my $file = $package->get_file(); my $dest = $repository->get_upload_dir($package, $target, $define); $dest =~ s!$repository->{_upload_root}/$repository->{_queue}!$self->{_root}!; -- cgit v1.2.1