Package: sbuild
Version: 0.57.7-1
When running:
sbuild -d jaunty *.dsc

I get this if BLOCK_SIZE=human-readable is set:
Argument "3.9G" isn't numeric in numeric lt (<) at 
/usr/share/perl5/Sbuild/Build.pm line 497.
Disk space is propably not enough for building.
(Source needs 2292 KB, free are 3.9G KB.)

This is due to the command sbuild uses to get the free size:
my $free = `/bin/df $dir | tail -n 1`;

This can be easily fixed by adding BLOCK_SIZE= to the beginning of the 
command(see attached patch).

% BLOCK_SIZE=human-readable df / | tail -n1
                       40G   29G  9,3G  76% /
% BLOCK_SIZE= df / | tail -n1
                      41284928  29458312   9729464  76% /

diff -Nru a/sbuild-0.57.7/lib/Sbuild/Build.pm b/sbuild-0.57.7/lib/Sbuild/Build.pm
--- a/sbuild-0.57.7/lib/Sbuild/Build.pm	2008-08-23 15:52:19.000000000 +0200
+++ b/sbuild-0.57.7/lib/Sbuild/Build.pm	2008-12-18 19:02:13.961634643 +0100
@@ -2252,7 +2252,7 @@
     my $self = shift;
     my $dir = shift;
 
-    my $free = `/bin/df $dir | tail -n 1`;
+    my $free = `BLOCK_SIZE= /bin/df $dir | tail -n 1`;
     my @free = split( /\s+/, $free );
     return $free[3];
 }

Reply via email to