BackupPC-users

Re: [BackupPC-users] '%s' character instead of size...

2009-12-12 19:08:49
Subject: Re: [BackupPC-users] '%s' character instead of size...
From: Craig Barratt <cbarratt AT users.sourceforge DOT net>
To: lupa <lupa18 AT gmail DOT com>
Date: Sat, 12 Dec 2009 16:06:16 -0800
lupa writes:

> for example: Total de bytes escritos: : %s (%s, %s/s): 151756...

That string is output from tar, not BackupPC.

This is an i18n bug in tar 1.16.x.  The translation strings include
the format specifies but the English version does not.  The code in
src/buffer.c does this:

  fprintf (fp, "%s: %s (%s, %s/s)\n",
           text, bytes,
           human_readable (numbytes, abbr, human_opts, 1, 1),
           (0 < duration && numbytes / duration < (uintmax_t) -1
            ? human_readable (numbytes / duration, rate, human_opts, 1, 1)
            : "?"));

The variable "text" is set to "Total bytes written" for English,
but "Bytes escritos en total: %s (%s, %s/s)\n" for, eg, Spanish.

However, BackupPC needs to see the English version.  You can force
that by setting LC_ALL = C, eg:

    $Conf{TarClientCmd} = '$sshPath -q -x -n -l root $host'
                        . ' env LC_ALL=C $tarPath -c -v -f - -C $shareName+'
                        . ' --totals';

Craig

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
BackupPC-users mailing list
BackupPC-users AT lists.sourceforge DOT net
List:    https://lists.sourceforge.net/lists/listinfo/backuppc-users
Wiki:    http://backuppc.wiki.sourceforge.net
Project: http://backuppc.sourceforge.net/

<Prev in Thread] Current Thread [Next in Thread>