Skip to content

Commit 873ee9b

Browse files
authored
Fix regression for query command changes in get_package_information and remove unused variables (#3677)
1 parent 3e91b51 commit 873ee9b

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

lisa/operating_system.py

+3-16
Original file line numberDiff line numberDiff line change
@@ -780,14 +780,6 @@ class Debian(Linux):
780780
r"\s+(?P<metadata>.*)\s*"
781781
)
782782

783-
""" Package: dpdk
784-
Version: 20.11.3-0ubuntu1~backport20.04-202111041420~ubuntu20.04.1
785-
Version: 1:2.25.1-1ubuntu3.2
786-
"""
787-
_debian_package_information_regex = re.compile(
788-
r"Package: ([a-zA-Z0-9:_\-\.]+)\r?\n" # package name group
789-
r"Version: ([a-zA-Z0-9:_\-\.~+]+)\r?\n" # version number group
790-
)
791783
# ex: 3.10
792784
# ex: 3.10.5-git
793785
# ex: 3.10-5git3
@@ -1491,9 +1483,8 @@ class RPMDistro(Linux):
14911483
# microsoft-azure-rhel8-eus Microsoft Azure RPMs for RHEL8 Extended Update Support
14921484
_rpm_repository_info_pattern = re.compile(r"(?P<id>\S+)\s+(?P<name>\S.*\S)\s*")
14931485

1494-
# ex: dpdk-20.11-3.el8.x86_64 or dpdk-18.11.8-1.el7_8.x86_64
1486+
# ex: 20.11-3.el8 or 18.11.8-1.el7_8
14951487
_rpm_version_splitter_regex = re.compile(
1496-
r"(?P<package_name>[a-zA-Z0-9\-_]+)-"
14971488
r"(?P<major>[0-9]+)\."
14981489
r"(?P<minor>[0-9]+)\.?"
14991490
r"(?P<patch>[0-9]+)?"
@@ -1993,12 +1984,8 @@ class Suse(Linux):
19931984
)
19941985
# Warning: There are no enabled repositories defined.
19951986
_no_repo_defined = re.compile("There are no enabled repositories defined.", re.M)
1996-
# Name : dpdk
1997-
# Version : 19.11.10-150400.4.7.1
1998-
_suse_package_information_regex = re.compile(
1999-
r"Name\s+: (?P<package_name>[a-zA-Z0-9:_\-\.]+)\r?\n"
2000-
r"Version\s+: (?P<package_version>[a-zA-Z0-9:_\-\.~+]+)\r?\n"
2001-
)
1987+
1988+
# 22.11.1-150600.3.9.1
20021989
_suse_version_splitter_regex = re.compile(
20031990
r"([0-9]+:)?" # some examples have a mystery number followed by a ':' (git)
20041991
r"(?P<major>[0-9]+)\." # major

0 commit comments

Comments
 (0)