Skip to content

Commit

Permalink
Merge pull request #1304 from rpm-software-management/rpm_4.20
Browse files Browse the repository at this point in the history
Handle the missing buildroot in rpm 4.20 gracefully
  • Loading branch information
danigm authored Jan 7, 2025
2 parents d660441 + 2a5b7a4 commit a0b90cf
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 a0b90cf

Please sign in to comment.