Index: TagsCheck.py =================================================================== --- TagsCheck.py (revision 1215) +++ TagsCheck.py (working copy) @@ -380,6 +380,8 @@ packager_regex=re.compile(Config.getOption('Packager')) basename_regex=re.compile('/?([^/]+)$') changelog_version_regex=re.compile('[^>]([^ >]+)\s*$') +dist_regex=Config.getOption('DistRegex') +if dist_regex: dist_regex=re.compile(dist_regex) release_ext=Config.getOption('ReleaseExtension') extension_regex=release_ext and re.compile(release_ext + '$') use_version_in_changelog=Config.getOption('UseVersionInChangelog', 1) @@ -591,11 +593,13 @@ srpm=pkg[rpm.RPMTAG_SOURCERPM] # only check when source name correspond to name if srpm[0:-8] == '%s-%s-%s' % (name, version, release): - expected=version + '-' + release + expected=[version + '-' + release] if epoch is not None: # regardless of use_epoch - expected=str(epoch) + ':' + expected - if expected != ret.group(1): - printWarning(pkg, 'incoherent-version-in-changelog', ret.group(1), expected) + expected[0]=str(epoch) + ':' + expected[0] + if dist_regex: + expected.append(dist_regex.sub('', expected[0])) + if ret.group(1) not in expected: + printWarning(pkg, 'incoherent-version-in-changelog', ret.group(1), expected[0]) clt=pkg[rpm.RPMTAG_CHANGELOGTEXT] if clt: changelog=changelog + clt