diff options
author | Gustavo De Nardin <spuk@mandriva.org> | 2007-12-07 18:26:17 +0000 |
---|---|---|
committer | Gustavo De Nardin <spuk@mandriva.org> | 2007-12-07 18:26:17 +0000 |
commit | 424a7f46e8070dc0bacb3bd7ecaf639977a6bcc0 (patch) | |
tree | 60731b620dbe72478d219282a122914341005e27 | |
parent | 35d5ababc9c11a82f669ac2343a64a72dec3250d (diff) | |
download | mga-youri-submit-424a7f46e8070dc0bacb3bd7ecaf639977a6bcc0.tar mga-youri-submit-424a7f46e8070dc0bacb3bd7ecaf639977a6bcc0.tar.gz mga-youri-submit-424a7f46e8070dc0bacb3bd7ecaf639977a6bcc0.tar.bz2 mga-youri-submit-424a7f46e8070dc0bacb3bd7ecaf639977a6bcc0.tar.xz mga-youri-submit-424a7f46e8070dc0bacb3bd7ecaf639977a6bcc0.zip |
- make Sendcache send debug packages only if explicitly told to, to save space
-rw-r--r-- | lib/Youri/Submit/Action/Sendcache.pm | 8 |
1 files 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}!; |