Merge lp:~laney/ubuntu-archive-tools/generate-freeze-block into lp:ubuntu-archive-tools

Proposed by Iain Lane
Status: Merged
Merged at revision: 1383
Proposed branch: lp:~laney/ubuntu-archive-tools/generate-freeze-block
Merge into: lp:ubuntu-archive-tools
Diff against target: 59 lines (+16/-6)
1 file modified
generate-freeze-block (+16/-6)
To merge this branch: bzr merge lp:~laney/ubuntu-archive-tools/generate-freeze-block
Reviewer Review Type Date Requested Status
Stéphane Graber Pending
Ubuntu Package Archive Administrators Pending
Review via email: mp+235316@code.launchpad.net

Description of the change

Add a new -n/--not-unique mode to generate a block for packages which FLAVOURS seed in common with other flavours.

I just re-confused myself about the semantics of this option, but it's what we wanted near trusty-release combined with the auto accept script. Read

  http://irclogs.ubuntu.com/2014/04/11/%23ubuntu-release.html#t08:58

onwards to see what was going on at the time. I just found it uncommitted in my home directory. :(

The second commit is a bugfix to -u mode. Currently -u <flavours> and -u <flavours> <more flavours> can have some packages in the first set but not the second, which should never happen.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'generate-freeze-block'
2--- generate-freeze-block 2014-02-24 18:37:45 +0000
3+++ generate-freeze-block 2014-09-19 17:12:26 +0000
4@@ -78,12 +78,18 @@
5 help='Block only packages unique to FLAVOURS')
6 parser.add_argument('--debug', '-d', action='store_true',
7 help='Output some extra debugging')
8+ parser.add_argument('--not-unique','-n', action='store_true',
9+ help='Block only packages also seeded outside of FLAVOURS')
10 args = parser.parse_args()
11
12 logging.basicConfig(stream=sys.stderr,
13 level=(logging.DEBUG if args.debug
14 else logging.WARNING))
15
16+ if args.not_unique and args.only_unique:
17+ LOGGER.error("Cannot specify --not-unique and --only-unique at the same time.")
18+ sys.exit(1)
19+
20 packages = GetPackage()
21
22 output = set()
23@@ -97,27 +103,31 @@
24 source_pkg = packages.getsourcepackage(k)
25 seeding_flavours = set([x[0] for x in v if x[1] != "supported"])
26
27+ if source_pkg and source_pkg in skip:
28+ continue
29+
30 # If you don't get to freeze others' packages
31- if args.only_unique:
32+ if args.only_unique or args.not_unique:
33 not_releasing_seeding_flavours = seeding_flavours - flavours
34 else:
35 not_releasing_seeding_flavours = None
36
37- if not_releasing_seeding_flavours:
38+ if not_releasing_seeding_flavours and args.only_unique:
39 LOGGER.debug(("Skipping %s (%s binary package) because it's"
40 + " seeded on %s") % (source_pkg, k, v))
41 output.discard(source_pkg)
42 skip.add(source_pkg)
43 continue
44-
45- if source_pkg and source_pkg in skip:
46+ elif source_pkg and flavours < seeding_flavours and not_releasing_seeding_flavours and args.not_unique:
47+ LOGGER.debug("Adding %s (%s binary package) due to %s (non-unique)"
48+ % (source_pkg, k, v))
49+ output.add(source_pkg)
50 continue
51
52- if seeding_flavours.intersection(flavours) and source_pkg:
53+ if not args.not_unique and seeding_flavours.intersection(flavours) and source_pkg:
54 LOGGER.debug("Adding %s (%s binary package) due to %s"
55 % (source_pkg, k, v))
56 output.add(source_pkg)
57- skip.add(source_pkg)
58
59 print ("block", " ".join(sorted(output)))
60

Subscribers

People subscribed via source and target branches