So pkg_add spits out errors when ftp outputs stuff like "Tube brisé" instead of the english version "Broken pipe". We need to override some locale-related settings to get the english version.
This is a minimal effort diff to do this. Maybe other LC_* variables could be dealt with, or a Perl-only solution would be more flexible, not sure. Suggestions welcome. Index: OpenBSD/PackageRepository.pm =================================================================== RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/PackageRepository.pm,v retrieving revision 1.95 diff -u -p -r1.95 PackageRepository.pm --- OpenBSD/PackageRepository.pm 28 Apr 2012 15:22:49 -0000 1.95 +++ OpenBSD/PackageRepository.pm 8 Dec 2013 12:03:39 -0000 @@ -595,7 +595,10 @@ sub grab_object { my ($self, $object) = @_; my ($ftp, @extra) = split(/\s+/, OpenBSD::Paths->ftp); - exec {$ftp} + my $env = OpenBSD::Paths->env; + exec {$env} + $env, + 'LC_MESSAGES=C', $ftp, @extra, "-o", Index: OpenBSD/Paths.pm =================================================================== RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/Paths.pm,v retrieving revision 1.21 diff -u -p -r1.21 Paths.pm --- OpenBSD/Paths.pm 16 Jan 2012 08:42:38 -0000 1.21 +++ OpenBSD/Paths.pm 8 Dec 2013 12:03:39 -0000 @@ -52,6 +52,7 @@ sub hostname() { '/bin/hostname' } sub sudo() { '/usr/bin/sudo' } sub du() { '/usr/bin/du' } sub diff() { '/usr/bin/diff' } +sub env() { '/usr/bin/env' } # Various paths sub shells() { '/etc/shells' }