summaryrefslogtreecommitdiffstats
path: root/urpm/select.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2020-04-28 11:00:11 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2020-04-29 14:47:52 +0200
commit9b0a99b6f6a19c474832ca56030f845e0f410c2d (patch)
tree4a30a757c1ae467b9658447b90e2bb669afeffab /urpm/select.pm
parent70942e1fef37d8661b0a0f4d4ed1612dc6574455 (diff)
downloadurpmi-9b0a99b6f6a19c474832ca56030f845e0f410c2d.tar
urpmi-9b0a99b6f6a19c474832ca56030f845e0f410c2d.tar.gz
urpmi-9b0a99b6f6a19c474832ca56030f845e0f410c2d.tar.bz2
urpmi-9b0a99b6f6a19c474832ca56030f845e0f410c2d.tar.xz
urpmi-9b0a99b6f6a19c474832ca56030f845e0f410c2d.zip
prevent forking a useless shell
as shown by previous commit
Diffstat (limited to 'urpm/select.pm')
-rw-r--r--urpm/select.pm5
1 files changed, 4 insertions, 1 deletions
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) = @_;