Merge lp:~freyes/cloud-archive-utils/expose-distribution into lp:cloud-archive-utils

Proposed by Felipe Reyes
Status: Needs review
Proposed branch: lp:~freyes/cloud-archive-utils/expose-distribution
Merge into: lp:cloud-archive-utils
Diff against target: 48 lines (+8/-3)
2 files modified
bin/cloud-archive-backport (+5/-1)
cloudarchive/backport.py (+3/-2)
To merge this branch: bzr merge lp:~freyes/cloud-archive-utils/expose-distribution
Reviewer Review Type Date Requested Status
Edward Hope-Morley Pending
Ubuntu Cloud Archive Team Pending
Review via email: mp+276319@code.launchpad.net

Description of the change

Dear Maintainer,

This patch add '--disitribution' flat to cloud-archive-backport program, this allows users to override the distribution passed to dch, in some situations we may want to backport packages that aren't related to OpenStack and having the option to alter this behavior is helpful.

Best,

To post a comment you must log in.

Unmerged revisions

42. By Felipe Reyes

Add help to --distribution

41. By Felipe Reyes

Expose distribution passed to 'dch' in the command line

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/cloud-archive-backport'
2--- bin/cloud-archive-backport 2015-07-15 14:33:13 +0000
3+++ bin/cloud-archive-backport 2015-10-30 20:54:43 +0000
4@@ -29,6 +29,9 @@
5 dest='proposed', action='store_true', default=False)
6 parser.add_option('-B', '--backports', help='Check backports pocket',
7 dest='backports', action='store_true', default=False)
8+ parser.add_option('-d', '--distribution', dest='distribution',
9+ help="Set distribution to be used in debian/changelog",
10+ default=None)
11 (opts, args) = parser.parse_args()
12
13 if len(args) == 0:
14@@ -46,4 +49,5 @@
15 do_backport(package=package, release=opts.release,
16 message=opts.changelog, suffix=opts.suffix,
17 out_dir=opts.out_dir, assume_yes=opts.assume_yes,
18- proposed=opts.proposed, backports=opts.backports)
19+ proposed=opts.proposed, backports=opts.backports,
20+ dist=opts.distribution)
21
22=== modified file 'cloudarchive/backport.py'
23--- cloudarchive/backport.py 2015-07-15 14:33:13 +0000
24+++ cloudarchive/backport.py 2015-10-30 20:54:43 +0000
25@@ -31,13 +31,13 @@
26
27 def do_backport(package, release, message=None, suffix="~cloud0",
28 out_dir=None, assume_yes=False, proposed=False,
29- backports=False):
30+ backports=False, dist=None):
31
32 ubuntu_series = SOURCE_RELEASE[release]
33 os_series = release
34 check_ppa = "{}-staging".format(os_series)
35 ubuntu_target = target_for_os_series(os_series)
36- chlog_dist = '{}-{}'.format(ubuntu_target, os_series)
37+ chlog_dist = dist or '{}-{}'.format(ubuntu_target, os_series)
38 return do_explicit_backport(package, ubuntu_series=ubuntu_series,
39 check_ppa=check_ppa, chlog_dist=chlog_dist,
40 changes_dist=ubuntu_target, message=message,
41@@ -156,6 +156,7 @@
42 '-v{}'.format(previous_version),
43 '--changes-option=-DDistribution={}'.format(changes_dist)
44 ]
45+ print cmd, dirname
46
47 if version_compare(upstream_version(version),
48 upstream_version(old_version)) == 1:

Subscribers

People subscribed via source and target branches