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

« back to all changes in this revision

Viewing changes to generate-team-p-m

  • Committer: Iain Lane
  • Date: 2020-04-07 10:02:51 UTC
  • mto: This revision was merged to the branch mainline in revision 272.
  • Revision ID: iain.lane@canonical.com-20200407100251-jqcsyzm2rj7wa0wk
generate-team-p-m: Attribute binary-only migration items to the right team

We need to split on the / and look the first part (package name) up in the
mapping

Show diffs side-by-side

added added

removed removed

Lines of Context:
283
283
    package_to_problems = defaultdict(list)
284
284
 
285
285
    for problem in in_proposed_packages.values():
286
 
        package_to_problems[problem.package_in_proposed].append(problem)
 
286
        # nautilus/riscv64 -> nautilus
 
287
        pkg = problem.package_in_proposed.split('/')[0]
 
288
        package_to_problems[pkg].append(problem)
287
289
        for regression in problem.regressions:
288
290
            if regression.blocking not in in_proposed_packages:
289
291
                continue
310
312
    else:
311
313
        subscribers = get_subscribers_json(set(package_to_problems), args.subscribers_json)
312
314
        for p in set(package_to_problems):
313
 
            if p not in subscribers:
 
315
            pkg = p.split('/')[0]
 
316
            if pkg not in subscribers:
314
317
                subscribers[p] = ['unknown']
315
318
 
316
319
    all_teams = set()