Projects
Eulaceura:Factory
system-storage-manager
_service:obs_scm:0001-Fix-parsing-cryptsetup-ve...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:0001-Fix-parsing-cryptsetup-version.patch of Package system-storage-manager
From be59e3960e02663c4e46b3260c129b934f6b0ab4 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny <vtrefny@redhat.com> Date: Mon, 27 Nov 2023 18:37:52 +0100 Subject: [PATCH] Fix parsing cryptsetup version 'cryptsetup --version' now prints some additional flag information so the existing function for parsing its version is broken. Fixes: #14 --- ssmlib/backends/crypt.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ssmlib/backends/crypt.py b/ssmlib/backends/crypt.py index 8d93fe9..e7bc377 100644 --- a/ssmlib/backends/crypt.py +++ b/ssmlib/backends/crypt.py @@ -52,7 +52,11 @@ def get_cryptsetup_version(): try: output = misc.run(['cryptsetup', '--version'], can_fail=True)[1] - version = list(map(int, output.strip().split()[-1].split('.', 3))) + m = re.search(r'cryptsetup ([\d\.]+)', output) + if not m or len(m.groups()) != 1: + version = [0, 0, 0] + else: + version = [int(v) for v in m.groups()[0].split(".")] except (OSError, AttributeError): version = [0, 0, 0] return version
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2