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
=== modified file 'citrain/build.py'
--- citrain/build.py 2014-10-17 13:17:58 +0000
+++ citrain/build.py 2014-10-27 21:19:15 +0000
@@ -46,11 +46,6 @@
46TAKE_WHOLE_COMMIT_MESSAGE46TAKE_WHOLE_COMMIT_MESSAGE
47 Use whole commit message in changelog, not just the brief part.47 Use whole commit message in changelog, not just the brief part.
4848
49DO_NOT_APPEND_RTM_TO_VERSION
50 Do not rewrite the version when doing a ubuntu-rtm landing, adding the ~rtm
51 tag to the upstream version. Should be used ONLY after the agreement of the
52 Landing Team.
53
54REBUILD_SOURCES_FOR_SYNC49REBUILD_SOURCES_FOR_SYNC
55 Only useful for sync requests. Instead of doing a binary copy of the50 Only useful for sync requests. Instead of doing a binary copy of the
56 packages from the selected archive, copy the sources and rebuild.51 packages from the selected archive, copy the sources and rebuild.
@@ -564,18 +559,14 @@
564 if not packagemanager.has_dont_change_version_flag():559 if not packagemanager.has_dont_change_version_flag():
565 version = packagemanager.create_new_packaging_version(560 version = packagemanager.create_new_packaging_version(
566 previous_packaging_version,561 previous_packaging_version,
567 series_version=SERIES_VERSION[series.name],562 series_version=SERIES_VERSION[series.name])
568 do_not_append_tag=(
569 env.DO_NOT_APPEND_RTM_TO_VERSION == "true"))
570 else:563 else:
571 version = packagemanager.get_packaging_version()564 version = packagemanager.get_packaging_version()
572 else:565 else:
573 version = packagemanager.create_new_packaging_version(566 version = packagemanager.create_new_packaging_version(
574 previous_packaging_version,567 previous_packaging_version,
575 destppa=dest_ppa_name,568 destppa=dest_ppa_name,
576 series_version=SERIES_VERSION[series.name],569 series_version=SERIES_VERSION[series.name])
577 do_not_append_tag=(
578 env.DO_NOT_APPEND_RTM_TO_VERSION == "true"))
579570
580 # Refresh symbol files571 # Refresh symbol files
581 logging.info("Update symbol files version if needed")572 logging.info("Update symbol files version if needed")
582573
=== modified file 'citrain/jenkins-templates/build.xml.tmpl'
--- citrain/jenkins-templates/build.xml.tmpl 2014-10-17 13:17:58 +0000
+++ citrain/jenkins-templates/build.xml.tmpl 2014-10-27 21:19:15 +0000
@@ -62,14 +62,9 @@
62 <defaultValue>false</defaultValue>62 <defaultValue>false</defaultValue>
63 </hudson.model.BooleanParameterDefinition>63 </hudson.model.BooleanParameterDefinition>
64 <hudson.model.BooleanParameterDefinition>64 <hudson.model.BooleanParameterDefinition>
65 <name>DO_NOT_APPEND_RTM_TO_VERSION</name>
66 <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>
67 <defaultValue>false</defaultValue>
68 </hudson.model.BooleanParameterDefinition>
69 <hudson.model.BooleanParameterDefinition>
70 <name>REBUILD_SOURCES_FOR_SYNC</name>65 <name>REBUILD_SOURCES_FOR_SYNC</name>
71 <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>66 <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>
72 <defaultValue>false</defaultValue>67 <defaultValue>true</defaultValue>
73 </hudson.model.BooleanParameterDefinition>68 </hudson.model.BooleanParameterDefinition>
74 <hudson.model.BooleanParameterDefinition>69 <hudson.model.BooleanParameterDefinition>
75 <name>DEBUG</name>70 <name>DEBUG</name>
7671
=== modified file 'cupstream2distro/packagemanager.py'
--- cupstream2distro/packagemanager.py 2014-10-20 23:28:07 +0000
+++ cupstream2distro/packagemanager.py 2014-10-27 21:19:15 +0000
@@ -540,8 +540,7 @@
540540
541def create_new_packaging_version(base_package_version,541def create_new_packaging_version(base_package_version,
542 series_version,542 series_version,
543 destppa='',543 destppa=''):
544 do_not_append_tag=False):
545 """Deliver a new packaging version, based on simple rules:544 """Deliver a new packaging version, based on simple rules:
546545
547 Version would be <upstream_version>.<series>.<yyyymmdd(.minor)>-0ubuntu1546 Version would be <upstream_version>.<series>.<yyyymmdd(.minor)>-0ubuntu1
@@ -556,9 +555,8 @@
556 # handle the special case of RTM555 # handle the special case of RTM
557 special_tag = ""556 special_tag = ""
558 if series_version == "14.09":557 if series_version == "14.09":
559 if not do_not_append_tag:558 logging.debug('Appending the ~rtm tag')
560 logging.debug('Appending the ~rtm tag')559 special_tag = "~rtm"
561 special_tag = "~rtm"
562 # XXX: we agreed that to keep the versioning sane, we need to stick to560 # XXX: we agreed that to keep the versioning sane, we need to stick to
563 # versioning as per the main archive561 # versioning as per the main archive
564 series_version = "14.10"562 series_version = "14.10"
565563
=== modified file 'tests/unit/test_packagemanager.py'
--- tests/unit/test_packagemanager.py 2014-10-20 23:28:07 +0000
+++ tests/unit/test_packagemanager.py 2014-10-27 21:19:15 +0000
@@ -1126,20 +1126,6 @@
1126 '42+14.10.19830913~rtm-0ubuntu1')1126 '42+14.10.19830913~rtm-0ubuntu1')
1127 strftime_call.assert_called_with('%Y%m%d')1127 strftime_call.assert_called_with('%Y%m%d')
11281128
1129 @patch('cupstream2distro.packagemanager.datetime')
1130 def test_new_packaging_version_for_rtm_without_appending_tag(
1131 self, datetimeMock):
1132 """Create a version for ubuntu-rtm, but without forcing ~rtm."""
1133 strftime_call = datetimeMock.date.today.return_value.strftime
1134 strftime_call.side_effect = lambda date: '19830913'
1135 self.assertEqual(
1136 packagemanager.create_new_packaging_version(
1137 '42+13.10.19830912-0ubuntu1',
1138 '14.09',
1139 do_not_append_tag=True),
1140 '42+14.10.19830913-0ubuntu1')
1141 strftime_call.assert_called_with('%Y%m%d')
1142
1143 def test_get_packaging_sourcename(self):1129 def test_get_packaging_sourcename(self):
1144 """Get the packaging source name."""1130 """Get the packaging source name."""
1145 self.get_data_branch('onemanualupload')1131 self.get_data_branch('onemanualupload')

Subscribers

People subscribed via source and target branches