fix: only check vX.Y btrfs version scheme

as the version perl module only handles perl-style
formatted version strings, aka x.y.z, and not other
formats that could happen such as "-rc", etc.
This commit is contained in:
Stéphane Lesimple 2022-01-06 19:30:17 +01:00
parent dd9f9bd7ac
commit 45a90860a1

View file

@ -437,7 +437,7 @@ if ($wantedFs) {
# check btrfs-progs version
my $cmd = run_cmd(fatal => 1, cmd => [qw{ btrfs --version }]);
my ($version) = $cmd->{stdout}->[0] =~ /v([0-9.]+)/;
my ($version) = $cmd->{stdout}->[0] =~ /v(\d+\.\d+)/;
if (version->declare($version)->numify lt version->declare("3.18")->numify && !$opt_ignore_version_check) {
print STDERR "FATAL: you're using an old version of btrfs-progs, v$version, "