[Piuparts-devel] piuparts-analyze needs to ignore BinNMU suffix in version numbers (\+b\d+$)

Andreas Beckmann debian at abeckmann.de
Mon Nov 21 13:40:06 UTC 2011


On 2011-11-20 02:30, Andreas Beckmann wrote:
> Traceback (most recent call last):
>   File "/org/piuparts.debian.org/share/piuparts/piuparts-analyze", line 231, in <module>
>     main()
>   File "/org/piuparts.debian.org/share/piuparts/piuparts-analyze", line 226, in main
>     mark_logs_with_reported_bugs()
>   File "/org/piuparts.debian.org/share/piuparts/piuparts-analyze", line 161, in mark_logs_with_reported_bugs
>     for bug_version in get_bug_versions(bug):
>   File "/org/piuparts.debian.org/share/piuparts/piuparts-analyze", line 130, in get_bug_versions
>     return reversed(sorted([x.split('/', 1)[1] for x in debianbts.get_status((bug,))[0].found_versions], cmp=apt_pkg.version_compare))
> IndexError: list index out of range

    # debianbts returns it in the format package/1.2.3 which will become 1.2.3
    return [x.split('/', 1)[1] for x in debianbts.get_status((bug,))[0].found_versions]

Thats not entirely correct, the bts returns either 'package/1.2.3' or just '1.2.3'

    x.rsplit('/', 1)[-1]

should do a better job.


Andreas



More information about the Piuparts-devel mailing list