Skip to content
Browse files

more coping with gzip not being where or what expected

  • Loading branch information...
1 parent c4aa720 commit e9f848f198900cc6de2ab3e02a2e3e10f4bd6f24 @rjbs rjbs committed Aug 13, 2011
Showing with 8 additions and 4 deletions.
  1. +1 −0 lib/PAUSE.pm
  2. +3 −3 lib/PAUSE/mldistwatch.pm
  3. +4 −1 t/lib/PAUSE/TestPAUSE.pm
View
1 lib/PAUSE.pm
@@ -71,6 +71,7 @@ $PAUSE::Config ||=
FTPPUB => '/home/ftp/pub/PAUSE/',
GONERS_NOTIFY => qq{gbarr\@search.cpan.org},
GZIP => '/bin/gzip',
+ GZIP_OPTIONS => '--best --rsyncable',
HOME => '/home/k/',
HTTP_ERRORLOG => '/usr/local/apache/logs/error_log',
INCOMING => 'ftp://pause.perl.org/incoming/',
View
6 lib/PAUSE/mldistwatch.pm
@@ -607,7 +607,7 @@ Last-Updated: $date\n\n};
rename "$repfile.new", $repfile or
$self->verbose(1,"Couldn't rename to '$repfile': $!");
PAUSE::newfile_hook($repfile);
- 0==system "$PAUSE::Config->{GZIP} --best --rsyncable --stdout $repfile > $repfile.gz.new"
+ 0==system "$PAUSE::Config->{GZIP} $PAUSE::Config->{GZIP_OPTIONS} --stdout $repfile > $repfile.gz.new"
or $self->verbose(1,"Couldn't gzip for some reason");
rename "$repfile.gz.new", "$repfile.gz" or
$self->verbose(1,"Couldn't rename to '$repfile.gz': $!");
@@ -1116,7 +1116,7 @@ Date: %s
rename "$repfile.new", $repfile or
$self->verbose(1,"Couldn't rename to '$repfile': $!");
PAUSE::newfile_hook($repfile);
- 0==system "$PAUSE::Config->{GZIP} --best --rsyncable --stdout $repfile > $repfile.gz.new"
+ 0==system "$PAUSE::Config->{GZIP} $PAUSE::Config->{GZIP_OPTIONS} --stdout $repfile > $repfile.gz.new"
or $self->verbose(1,"Couldn't gzip for some reason");
rename "$repfile.gz.new", "$repfile.gz" or
$self->verbose(1,"Couldn't rename to '$repfile.gz': $!");
@@ -1210,7 +1210,7 @@ Date: %s
rename "$repfile.new", $repfile or
$self->verbose(1,"Couldn't rename to '$repfile': $!");
PAUSE::newfile_hook($repfile);
- 0==system "$PAUSE::Config->{GZIP} --best --rsyncable --stdout $repfile > $repfile.gz.new"
+ 0==system "$PAUSE::Config->{GZIP} $PAUSE::Config->{GZIP_OPTIONS} --stdout $repfile > $repfile.gz.new"
or $self->verbose(1,"Couldn't gzip for some reason");
rename "$repfile.gz.new", "$repfile.gz" or
$self->verbose(1,"Couldn't rename to '$repfile.gz': $!");
View
5 t/lib/PAUSE/TestPAUSE.pm
@@ -6,8 +6,9 @@ use autodie;
use DBI;
use File::Path qw(make_path);
-use File::Temp ();
use File::Copy::Recursive qw(dircopy);
+use File::Temp ();
+use File::Which;
use PAUSE;
use PAUSE::mldistwatch;
@@ -53,6 +54,8 @@ sub test {
my %overrides = (
AUTHEN_DATA_SOURCE_NAME => "$dsnbase/authen.sqlite",
CHECKSUMS_SIGNING_PROGRAM => "\0",
+ GZIP => which('gzip'),
+ GZIP_OPTIONS => '',
MLROOT => File::Spec->catdir($ml_root),
ML_CHOWN_GROUP => +(getgrgid($)))[0],
ML_CHOWN_USER => +(getpwuid($>))[0],

0 comments on commit e9f848f

Please sign in to comment.
Something went wrong with that request. Please try again.