Hi Guillem, > I think this should be relatively easy to compute:
Indeed — 9182/33705 packages need a rebuild in sid. (Full output of following script attached.) #!/usr/bin/env python3 import os import re import glob import bisect import psycopg2 import collections from debian import deb822 from debian.debian_support import version_compare re_installed_build_depends = re.compile( r'^(?P<package>[^ ]+) \(= (?P<version>.+)\)' ) def get_buildinfos(): path = '/srv/ftp-master.debian.org/buildinfo/*/*/*/*.buildinfo' result = collections.defaultdict(list) for x in glob.glob(path): src = os.path.basename(x).split('_')[0] bisect.insort(result[src], x) return result def gen_sources(): connection = psycopg2.connect( user='udd-mirror', dbname='udd', password='udd-mirror', host='udd-mirror.debian.net', ) c = connection.cursor() c.execute(""" SELECT source FROM all_sources WHERE distribution = 'debian' AND release = 'sid' ORDER BY source ASC """) for x in c: yield x[0] def main(): buildinfos = get_buildinfos() for src in gen_sources(): try: with open(buildinfos[src][-1]) as f: data = deb822.Deb822(f) except IndexError: print("{} needs rebuild (no .buildinfo)".format(src)) continue built_using = {} for x in data['Installed-Build-Depends'].strip().splitlines(): m = re_installed_build_depends.match(x.strip()) built_using[m.group('package')] = m.group('version') dpkg_version = built_using.get('dpkg-dev', '0~missing') if version_compare(dpkg_version, '1.18.17') == -1: print("{} needs rebuild (built using dpkg-dev {})".format( src, dpkg_version)) if __name__ == '__main__': main() Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
output.txt.gz
Description: application/gzip