Merge lp:~robru/cupstream2distro/force-rtm-versions into lp:cupstream2distro

Proposed by Robert Bruce Park
Status: Merged
Approved by: Robert Bruce Park
Approved revision: 792
Merged at revision: 792
Proposed branch: lp:~robru/cupstream2distro/force-rtm-versions
Merge into: lp:cupstream2distro
Diff against target: 107 lines (+6/-36)
4 files modified
citrain/build.py (+2/-11)
citrain/jenkins-templates/build.xml.tmpl (+1/-6)
cupstream2distro/packagemanager.py (+3/-5)
tests/unit/test_packagemanager.py (+0/-14)
To merge this branch: bzr merge lp:~robru/cupstream2distro/force-rtm-versions
Reviewer Review Type Date Requested Status
Łukasz Zemczak Approve
Robert Bruce Park (community) Approve
PS Jenkins bot continuous-integration Approve
Ursula Junque Pending
Review via email: mp+239775@code.launchpad.net

Commit message

Require '~rtm' in the version number for all source builds in RTM.

Description of the change

As requested by slangasek, all source builds for RTM are required to have ~rtm in the version number.

To post a comment you must log in.
792. By Robert Bruce Park

And default to source syncs as well.

Revision history for this message
Robert Bruce Park (robru) wrote :

(don't be afraid of the deleted test, it tests a codepath that is being deleted)

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

PASSED: Continuous integration, rev:792
http://jenkins.qa.ubuntu.com/job/cu2d-choo-choo-ci/240/
Executed test runs:

Click here to trigger a rebuild:
http://s-jenkins.ubuntu-ci:8080/job/cu2d-choo-choo-ci/240/rebuild

review: Approve (continuous-integration)
Revision history for this message
Robert Bruce Park (robru) wrote :

Lukasz gave a verbal approval in the landing meeting today.

review: Approve
Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Right, as mentioned by Robert, a +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'citrain/build.py'
2--- citrain/build.py 2014-10-17 13:17:58 +0000
3+++ citrain/build.py 2014-10-27 21:19:15 +0000
4@@ -46,11 +46,6 @@
5 TAKE_WHOLE_COMMIT_MESSAGE
6 Use whole commit message in changelog, not just the brief part.
7
8-DO_NOT_APPEND_RTM_TO_VERSION
9- Do not rewrite the version when doing a ubuntu-rtm landing, adding the ~rtm
10- tag to the upstream version. Should be used ONLY after the agreement of the
11- Landing Team.
12-
13 REBUILD_SOURCES_FOR_SYNC
14 Only useful for sync requests. Instead of doing a binary copy of the
15 packages from the selected archive, copy the sources and rebuild.
16@@ -564,18 +559,14 @@
17 if not packagemanager.has_dont_change_version_flag():
18 version = packagemanager.create_new_packaging_version(
19 previous_packaging_version,
20- series_version=SERIES_VERSION[series.name],
21- do_not_append_tag=(
22- env.DO_NOT_APPEND_RTM_TO_VERSION == "true"))
23+ series_version=SERIES_VERSION[series.name])
24 else:
25 version = packagemanager.get_packaging_version()
26 else:
27 version = packagemanager.create_new_packaging_version(
28 previous_packaging_version,
29 destppa=dest_ppa_name,
30- series_version=SERIES_VERSION[series.name],
31- do_not_append_tag=(
32- env.DO_NOT_APPEND_RTM_TO_VERSION == "true"))
33+ series_version=SERIES_VERSION[series.name])
34
35 # Refresh symbol files
36 logging.info("Update symbol files version if needed")
37
38=== modified file 'citrain/jenkins-templates/build.xml.tmpl'
39--- citrain/jenkins-templates/build.xml.tmpl 2014-10-17 13:17:58 +0000
40+++ citrain/jenkins-templates/build.xml.tmpl 2014-10-27 21:19:15 +0000
41@@ -62,14 +62,9 @@
42 <defaultValue>false</defaultValue>
43 </hudson.model.BooleanParameterDefinition>
44 <hudson.model.BooleanParameterDefinition>
45- <name>DO_NOT_APPEND_RTM_TO_VERSION</name>
46- <description>Do not rewrite the version when doing a ubuntu-rtm landing, adding the ~rtm tag to the upstream version. Should be used ONLY after the agreement of the Landing Team.</description>
47- <defaultValue>false</defaultValue>
48- </hudson.model.BooleanParameterDefinition>
49- <hudson.model.BooleanParameterDefinition>
50 <name>REBUILD_SOURCES_FOR_SYNC</name>
51 <description>Only useful for sync requests. Instead of doing a binary copy of the packages from the selected archive, copy the sources and rebuild.</description>
52- <defaultValue>false</defaultValue>
53+ <defaultValue>true</defaultValue>
54 </hudson.model.BooleanParameterDefinition>
55 <hudson.model.BooleanParameterDefinition>
56 <name>DEBUG</name>
57
58=== modified file 'cupstream2distro/packagemanager.py'
59--- cupstream2distro/packagemanager.py 2014-10-20 23:28:07 +0000
60+++ cupstream2distro/packagemanager.py 2014-10-27 21:19:15 +0000
61@@ -540,8 +540,7 @@
62
63 def create_new_packaging_version(base_package_version,
64 series_version,
65- destppa='',
66- do_not_append_tag=False):
67+ destppa=''):
68 """Deliver a new packaging version, based on simple rules:
69
70 Version would be <upstream_version>.<series>.<yyyymmdd(.minor)>-0ubuntu1
71@@ -556,9 +555,8 @@
72 # handle the special case of RTM
73 special_tag = ""
74 if series_version == "14.09":
75- if not do_not_append_tag:
76- logging.debug('Appending the ~rtm tag')
77- special_tag = "~rtm"
78+ logging.debug('Appending the ~rtm tag')
79+ special_tag = "~rtm"
80 # XXX: we agreed that to keep the versioning sane, we need to stick to
81 # versioning as per the main archive
82 series_version = "14.10"
83
84=== modified file 'tests/unit/test_packagemanager.py'
85--- tests/unit/test_packagemanager.py 2014-10-20 23:28:07 +0000
86+++ tests/unit/test_packagemanager.py 2014-10-27 21:19:15 +0000
87@@ -1126,20 +1126,6 @@
88 '42+14.10.19830913~rtm-0ubuntu1')
89 strftime_call.assert_called_with('%Y%m%d')
90
91- @patch('cupstream2distro.packagemanager.datetime')
92- def test_new_packaging_version_for_rtm_without_appending_tag(
93- self, datetimeMock):
94- """Create a version for ubuntu-rtm, but without forcing ~rtm."""
95- strftime_call = datetimeMock.date.today.return_value.strftime
96- strftime_call.side_effect = lambda date: '19830913'
97- self.assertEqual(
98- packagemanager.create_new_packaging_version(
99- '42+13.10.19830912-0ubuntu1',
100- '14.09',
101- do_not_append_tag=True),
102- '42+14.10.19830913-0ubuntu1')
103- strftime_call.assert_called_with('%Y%m%d')
104-
105 def test_get_packaging_sourcename(self):
106 """Get the packaging source name."""
107 self.get_data_branch('onemanualupload')

Subscribers

People subscribed via source and target branches