Merge lp:~laney/ubuntu-archive-tools/promote-to-release-move into lp:ubuntu-archive-tools

Proposed by Iain Lane
Status: Merged
Merged at revision: 1455
Proposed branch: lp:~laney/ubuntu-archive-tools/promote-to-release-move
Merge into: lp:ubuntu-archive-tools
Diff against target: 70 lines (+3/-43)
1 file modified
promote-to-release (+3/-43)
To merge this branch: bzr merge lp:~laney/ubuntu-archive-tools/promote-to-release-move
Reviewer Review Type Date Requested Status
Colin Watson Approve
Review via email: mp+399176@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

This LGTM.

It may be worth noting that this makes the handling of single-architecture promotions even more obviously fictional than it already was. It was already the case that requesting a single-architecture promotion in fact caused the source and all its binaries to be copied (since copyPackage doesn't expose a way to limit the copy by architectures). promote-by-release previously attempted to limit the deletion by architecture, but that didn't actually make much sense without also limiting the copy. Now the whole source will be both copied and deleted, or neither, regardless of any attempt by britney to request promotions of single architectures.

I think this is not really any worse than what was there before, but I thought I'd point it out.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'promote-to-release'
--- promote-to-release 2020-11-02 18:24:01 +0000
+++ promote-to-release 2021-03-04 17:26:00 +0000
@@ -53,10 +53,10 @@
53 return True53 return True
5454
55 if options.dry_run:55 if options.dry_run:
56 print("Would copy: %s" % display)56 print("Would move: %s" % display)
57 return57 return
58 elif options.verbose:58 elif options.verbose:
59 print("Copying: %s" % display)59 print("Moving: %s" % display)
60 sys.stdout.flush()60 sys.stdout.flush()
6161
62 try:62 try:
@@ -64,7 +64,7 @@
64 if options.pocket == 'updates':64 if options.pocket == 'updates':
65 percentage = 1065 percentage = 10
66 options.archive.copyPackage(66 options.archive.copyPackage(
67 source_name=name, version=version,67 move=True, source_name=name, version=version,
68 from_archive=options.archive,68 from_archive=options.archive,
69 from_series=options.series.name, from_pocket="Proposed",69 from_series=options.series.name, from_pocket="Proposed",
70 to_series=options.series.name, to_pocket=options.pocket.title(),70 to_series=options.series.name, to_pocket=options.pocket.title(),
@@ -75,46 +75,6 @@
75 print("copyPackage %s: %s" % (display, e.content), file=sys.stderr)75 print("copyPackage %s: %s" % (display, e.content), file=sys.stderr)
76 return False76 return False
7777
78 try:
79 proposed_source = options.archive.getPublishedSources(
80 source_name=name, version=version,
81 distro_series=options.series, pocket="Proposed",
82 exact_match=True)[0]
83 except HTTPError as e:
84 print("getPublishedSources %s: %s" % (display, e.content),
85 file=sys.stderr)
86 return True
87 except IndexError:
88 print("getPublishedSources %s found no publication" % display,
89 file=sys.stderr)
90 return True
91
92 if architecture is None:
93 try:
94 proposed_source.requestDeletion(removal_comment="moved to %s" %
95 options.pocket)
96 except HTTPError as e:
97 print("requestDeletion %s: %s" % (display, e.content),
98 file=sys.stderr)
99 else:
100 for bpph in proposed_source.getPublishedBinaries():
101 if bpph.is_debug:
102 continue
103 elif bpph.architecture_specific:
104 if architecture != bpph.distro_arch_series.architecture_tag:
105 continue
106 else:
107 if architecture != "i386":
108 continue
109 try:
110 bpph.requestDeletion(removal_comment="moved to %s" %
111 options.pocket)
112 except HTTPError as e:
113 print("requestDeletion %s/%s/%s: %s" %
114 (bpph.binary_package_name, bpph.binary_package_version,
115 bpph.distro_arch_series.architecture_tag, e.content),
116 file=sys.stderr)
117
118 return True78 return True
11979
12080

Subscribers

People subscribed via source and target branches