This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=3f0ed647b7a37162f18adac45f7513adb16fc0c1

commit 3f0ed647b7a37162f18adac45f7513adb16fc0c1
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Sun May 7 17:38:43 2023 +0200

    scripts: Do not set LANG unnecessarily
    
    Setting LC_ALL to "C" should be sufficient, as that will have precedence
    over any other environment variable, so there is no need to in addition
    set LANG also to "C".
---
 scripts/Build.PL.in          | 1 -
 scripts/Dpkg/Source/Patch.pm | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/scripts/Build.PL.in b/scripts/Build.PL.in
index bbf382887..76fb04e54 100644
--- a/scripts/Build.PL.in
+++ b/scripts/Build.PL.in
@@ -69,7 +69,6 @@ my $class = Module::Build->subclass(
         sub ACTION_test {
             my $self = shift;
 
-            local $ENV{LANG} = 'C';
             local $ENV{LC_ALL} = 'C';
             local $ENV{PERL} = $Config::Config{perlpath} || $^X || 'perl';
             local $ENV{DPKG_TEST_MODE} = 'cpan';
diff --git a/scripts/Dpkg/Source/Patch.pm b/scripts/Dpkg/Source/Patch.pm
index 84e9737b7..0da35b9e5 100644
--- a/scripts/Dpkg/Source/Patch.pm
+++ b/scripts/Dpkg/Source/Patch.pm
@@ -124,7 +124,7 @@ sub add_diff_file {
     my $diffgen;
     my $diff_pid = spawn(
         exec => [ 'diff', '-u', @options, '--', $old, $new ],
-        env => { LC_ALL => 'C', LANG => 'C', TZ => 'UTC0' },
+        env => { LC_ALL => 'C', TZ => 'UTC0' },
         to_pipe => \$diffgen,
     );
     # Check diff and write it in patch file
@@ -616,7 +616,7 @@ sub apply {
     spawn(
        exec => [ $Dpkg::PROGPATCH, @{$opts{options}} ],
        chdir => $destdir,
-       env => { LC_ALL => 'C', LANG => 'C', PATCH_GET => '0' },
+        env => { LC_ALL => 'C', PATCH_GET => '0' },
        delete_env => [ 'POSIXLY_CORRECT' ], # ensure expected patch behaviour
        wait_child => 1,
        nocheck => 1,
@@ -676,7 +676,7 @@ sub check_apply {
     my $patch_pid = spawn(
        exec => [ $Dpkg::PROGPATCH, @{$opts{options}} ],
        chdir => $destdir,
-       env => { LC_ALL => 'C', LANG => 'C', PATCH_GET => '0' },
+        env => { LC_ALL => 'C', PATCH_GET => '0' },
        delete_env => [ 'POSIXLY_CORRECT' ], # ensure expected patch behaviour
        from_handle => $self->get_filehandle(),
        to_file => '/dev/null',

-- 
Dpkg.Org's dpkg

Reply via email to