~ubuntu-archive/ubuntu-archive-scripts/trunk

« back to all changes in this revision

Viewing changes to find-rcbuggy-problem-packages

  • Committer: Michael Hudson-Doyle
  • Date: 2019-09-01 22:57:29 UTC
  • mto: This revision was merged to the branch mainline in revision 239.
  • Revision ID: michael.hudson@canonical.com-20190901225729-tee217an5b4lewpq
find rc-gone packages blocking transitions

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/python3
2
2
 
3
3
import sys
 
4
import subprocess
4
5
 
5
6
import yaml
6
7
 
7
8
with open(sys.argv[1]) as fp:
8
9
    ubuntu_excuses = yaml.load(fp, Loader=yaml.CSafeLoader)
9
10
with open(sys.argv[2]) as fp:
 
11
    srcpkg = None
 
12
    uninstallable_to_src_pkg = {}
 
13
    for line in fp:
 
14
        parts = line.split()
 
15
        if len(parts) >= 2:
 
16
            if parts[0] == 'skipped:':
 
17
                srcpkg = None
 
18
                if parts[2].startswith('('):
 
19
                    srcpkg = parts[1]
 
20
            if srcpkg is not None and parts[0] == '*':
 
21
                for pkg in parts[2:]:
 
22
                    pkg = pkg.strip(',')
 
23
                    uninstallable_to_src_pkg.setdefault(pkg, set()).add(srcpkg)
 
24
with open(sys.argv[3]) as fp:
10
25
    debian_excuses = yaml.load(fp, Loader=yaml.CSafeLoader)
11
26
 
12
27
rc_gone = set()
18
33
        if rc_bug_verdict == "REJECTED_PERMANENTLY":
19
34
            rc_gone.add(source['item-name'])
20
35
 
 
36
in_proposed_by_autopkgtest_or_missing_binaries = set()
 
37
 
21
38
for source in ubuntu_excuses['sources']:
22
39
    if 'autopkgtest' in source['reason']:
 
40
        in_proposed_by_autopkgtest_or_missing_binaries.add(source['item-name'])
23
41
        for package, results in sorted(source['policy_info']['autopkgtest'].items()):
24
42
            package = package.split('/')[0]
25
43
            if package not in rc_gone:
29
47
                if outcome == "REGRESSION":
30
48
                    print(package, "blocks", source['item-name'], "by autopkgtest regression")
31
49
                    break
 
50
    if 'missing-builds' in source:
 
51
        in_proposed_by_autopkgtest_or_missing_binaries.add(source['item-name'])
 
52
 
 
53
for pkg in rc_gone:
 
54
    if pkg not in in_proposed_by_autopkgtest_or_missing_binaries:
 
55
        continue
 
56
    cp = subprocess.run(["chdist", "grep-dctrl-packages", "eoan", "-SwnsPackage", pkg], stdout=subprocess.PIPE, encoding='ascii')
 
57
    bin_pkgs = set(cp.stdout.splitlines())
 
58
    for bin_pkg in sorted(bin_pkgs):
 
59
        if bin_pkg in uninstallable_to_src_pkg:
 
60
            print(pkg, "blocks", sorted(uninstallable_to_src_pkg[bin_pkg]), "by uninstallability of", bin_pkg)