Skip to content

Commit

Permalink
Handle the missing buildroot in rpm 4.20 gracefully
Browse files Browse the repository at this point in the history
Fall back to another way of determining potential buildroot locations
as 4.20 removed the use of buildroot.
  • Loading branch information
dirkmueller authored and danigm committed Jan 7, 2025
1 parent d660441 commit 2a5b7a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rpmlint/checks/BuildRootAndDateCheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

0 comments on commit 2a5b7a4

Please sign in to comment.