[buildd-tools-devel] Bug#509133: [Buildd-tools-devel] Bug#509133: sbuild does not work if BLOCK_SIZE=human-readable is set in the environment

Roger Leigh rleigh at codelibre.net
Tue May 19 22:22:54 UTC 2009


tags fixed-upstream pending
thanks

On Thu, Dec 18, 2008 at 07:26:09PM +0100, Guillaume Martres wrote:
> 
> 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.
> 
> 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% /

This has been fixed in upstream git by using the statvfs(2) system call
directly, rather than calling /bin/df and then parsing its output
(which is always potentially broken, since df can fold its output over
multiple lines if the path is too long, even if BLOCK_SIZE is set
correctly).

http://git.debian.org/?p=buildd-tools/sbuild.git;a=commitdiff;h=8dc01a896e1b6f1e8a20c15c82ec0e99c8836a33
http://git.debian.org/?p=buildd-tools/sbuild.git;a=commitdiff;h=ce5ef3dabd6a722e8cd515f0694c09343ec49bed


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.





More information about the Buildd-tools-devel mailing list