From 2a5b7a4de4d7c0723f5b76064e8adf6f7f2977f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dirk=20M=C3=BCller?= Date: Fri, 20 Dec 2024 16:05:45 +0100 Subject: [PATCH] Handle the missing buildroot in rpm 4.20 gracefully Fall back to another way of determining potential buildroot locations as 4.20 removed the use of buildroot. --- rpmlint/checks/BuildRootAndDateCheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpmlint/checks/BuildRootAndDateCheck.py b/rpmlint/checks/BuildRootAndDateCheck.py index c4807b31c..c22bbcadd 100644 --- a/rpmlint/checks/BuildRootAndDateCheck.py +++ b/rpmlint/checks/BuildRootAndDateCheck.py @@ -17,7 +17,7 @@ def __init__(self, config, output): super().__init__(config, output, r'.*') self.looksliketime = re.compile('(2[0-3]|[01]?[0-9]):([0-5]?[0-9]):([0-5]?[0-9])') self.istoday = re.compile(time.strftime('%b %e %Y')) - self.prepare_regex(rpm.expandMacro('%buildroot')) + self.prepare_regex(rpm.expandMacro('%{?buildroot}') or '^/.*/BUILDROOT/') def prepare_regex(self, buildroot): for m in ('name', 'version', 'release', 'NAME', 'VERSION', 'RELEASE'):