From 9b0a99b6f6a19c474832ca56030f845e0f410c2d Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 28 Apr 2020 11:00:11 +0200 Subject: prevent forking a useless shell as shown by previous commit --- urpm/select.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/urpm/select.pm b/urpm/select.pm index 9e16b0b8..23184f57 100644 --- a/urpm/select.pm +++ b/urpm/select.pm @@ -718,7 +718,10 @@ sub translate_why_removed_one { } sub _libdb_version { $_[0] =~ /libdb-(\S+)\.so/ ? version->new("v$1") : () } -sub _rpm_version() { `LC_ALL=C rpm --version` =~ /version ([0-9.]+)(?:-(beta|rc).*)?$/ ? version->new("v$1") : () } +sub _rpm_version() { + local $ENV{LC_ALL} = 'C'; + `rpm --version` =~ /version ([0-9.]+)(?:-(beta|rc).*)?$/ ? version->new("v$1") : (); +} sub should_we_migrate_back_rpmdb_db_version { my ($urpm, $state) = @_; -- cgit v1.2.1