From 2189c69cead5cb3717ef9f06beebd9bca519ad79 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Tue, 28 Jul 2009 19:02:08 +0100 Subject: [PATCH] Recompress the tsv (and err make it work again??) --- pctb/commod-update-receiver | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pctb/commod-update-receiver b/pctb/commod-update-receiver index 7814de8..2c02c11 100755 --- a/pctb/commod-update-receiver +++ b/pctb/commod-update-receiver @@ -146,18 +146,24 @@ if (!$gunzchild) { exec 'gunzip'; die $!; } +my $dedupedtsv= pipethrough_prep(); + while () { - check_tsv_line($_,\&fail); + my @v= check_tsv_line($_,\&fail); + print $dedupedtsv join('\t',@v),"\n" or die $!; } + GZ->error and die $!; $?=0; close GZ; $? and fail("gunzip for check failed code $?"); +my $launderedgz= pipethrough_run($dedupedtsv,undef,'gzip','gzip'); + my $mdatafile= MIME::Entity->build(Top => 0, Type => 'application/octet-stream', Disposition => 'attachment', Encoding => 'base64', Filename => 'deduped.tsv.gz', - Path => $datafile); + Data => $launderedgz); $mcontent->add_part($mdatafile); open M, "|/usr/sbin/sendmail -t -oi -oee -odb" -- 2.30.2