Bug#1062437: python-debian: When Files: is a whitespace-separated list, files are matched too eagerly
Lasse Collin
lasse.collin at tukaani.org
Sun Feb 11 19:25:26 GMT 2024
One way to fix it is to change buf.write('|') to buf.write('\Z|') in
globs_to_re in copyright.py line 485[1]. The comment at the end of the
method sounds like that the thinking had been that in 'foo|bar\Z' the
\Z would affect matching of foo but in reality only affects bar.
Other possibility is modifying matches(). In copyright.py line 758,
pat.match(filename) could be changed to pat.fullmatch(filename). Then
globs_to_re wouldn't need to add \Z even at the end.
[1]
https://salsa.debian.org/python-debian-team/python-debian/-/blob/e7990d2ab83057a2aaf7851f4250f1072f6fee8c/lib/debian/copyright.py#L485
[2]
https://salsa.debian.org/python-debian-team/python-debian/-/blob/master/src/debian/copyright.py#L758
--
Lasse Collin
More information about the pkg-python-debian-maint
mailing list