tags 520755 + patch
thanks

On Sun, Mar 29, 2009 at 06:43:33PM +0200, Daniel Kobras wrote:
> Hi!
> 
> On Sun, Mar 29, 2009 at 02:52:16PM +0100, Roger Leigh wrote:
> > Does the attached patch fix things for you when run in a non-C or POSIX
> > locale?
> 
> Yep, this seems to do the trick on my system.

Great, thanks for confirming.  I'll merge the following slightly
cleaner version of the patch:


diff --git a/lib/Sbuild/ChrootInfoSchroot.pm b/lib/Sbuild/ChrootInfoSchroot.pm
index 1094f27..97d839c 100644
--- a/lib/Sbuild/ChrootInfoSchroot.pm
+++ b/lib/Sbuild/ChrootInfoSchroot.pm
@@ -1,6 +1,6 @@
 #
 # ChrootInfo.pm: chroot utility library for sbuild
-# Copyright © 2005-2006 Roger Leigh <[email protected]>
+# Copyright © 2005-2009 Roger Leigh <[email protected]>
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -53,6 +53,12 @@ sub get_info {
     my %tmp = ('Priority' => 0,
               'Location' => "",
               'Session Purged' => 0);
+
+    local %ENV;
+
+    $ENV{'LC_ALL'} = 'C';
+    $ENV{'LANGUAGE'} = 'C';
+
     open CHROOT_DATA, '-|', $self->get_conf('SCHROOT'), '--info', '--chroot', 
$chroot
        or die 'Can\'t run ' . $self->get_conf('SCHROOT') . ' to get chroot 
data';
     while (<CHROOT_DATA>) {
@@ -100,6 +106,11 @@ sub get_info_all {
     my $chroots = {};
     my $build_dir = $self->get_conf('BUILD_DIR');
 
+    local %ENV;
+
+    $ENV{'LC_ALL'} = 'C';
+    $ENV{'LANGUAGE'} = 'C';
+
     open CHROOTS, '-|', $self->get_conf('SCHROOT'), '--list'
        or die 'Can\'t run ' . $self->get_conf('SCHROOT');
     while (<CHROOTS>) {

-- 
  .''`.  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.

Attachment: signature.asc
Description: Digital signature

Reply via email to