← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/series-for-all-builds into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/series-for-all-builds into lp:launchpad.

Commit message:
Pass the series name in a "series" argument to all build types, making it easier to use it in common code in launchpad-buildd.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/series-for-all-builds/+merge/328097

I realised I wanted this when working on consolidating some duplicated code in launchpad-buildd.  unpack-debian-chroot looks at $SUITE, but nobody ever noticed that nothing actually passes a suite to it; furthermore, what it really wants is the series name.  Although the specific use case there (--uname-2.6) is almost obsolete, it's conceptually reasonable for it to have this information, and it's better for buildd-manager to pass it directly than to have launchpad-buildd get at the suite in build-type-dependent ways and parse it itself.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/series-for-all-builds into lp:launchpad.
=== modified file 'lib/lp/code/model/recipebuilder.py'
--- lib/lp/code/model/recipebuilder.py	2017-04-29 23:51:28 +0000
+++ lib/lp/code/model/recipebuilder.py	2017-07-26 13:45:32 +0000
@@ -48,6 +48,7 @@
         """
         # Build extra arguments.
         args = {}
+        args['series'] = self.build.distroseries.name
         args['suite'] = self.build.distroseries.getSuite(self.build.pocket)
         args['arch_tag'] = distroarchseries.architecturetag
         requester = self.build.requester
@@ -73,6 +74,9 @@
                 tools_source=config.builddmaster.bzr_builder_sources_list,
                 logger=logger))
         args['archive_private'] = self.build.archive.private
+        # XXX cjwatson 2017-07-26: This duplicates "series", which is common
+        # to all build types; this name for it is deprecated and should be
+        # removed once launchpad-buildd no longer requires it.
         args['distroseries_name'] = self.build.distroseries.name
         if self.build.recipe.base_git_repository is not None:
             args['git'] = True

=== modified file 'lib/lp/code/model/tests/test_recipebuilder.py'
--- lib/lp/code/model/tests/test_recipebuilder.py	2017-04-29 23:51:28 +0000
+++ lib/lp/code/model/tests/test_recipebuilder.py	2017-07-26 13:45:32 +0000
@@ -182,6 +182,7 @@
             'archive_private': False,
             'arch_tag': 'i386',
             'author_email': u'requester@xxxxxxxxxx',
+            'series': job.build.distroseries.name,
             'suite': u'mydistro',
             'author_name': u'Joe User',
             'archive_purpose': 'PPA',
@@ -274,6 +275,7 @@
             'archive_private': False,
             'arch_tag': 'i386',
             'author_email': u'requester@xxxxxxxxxx',
+            'series': job.build.distroseries.name,
             'suite': u'mydistro',
             'author_name': u'Joe User',
             'archive_purpose': 'PPA',
@@ -314,6 +316,7 @@
             'archive_private': False,
             'arch_tag': 'i386',
             'author_email': u'requester@xxxxxxxxxx',
+            'series': job.build.distroseries.name,
             'suite': u'mydistro',
             'author_name': u'Joe User',
             'archive_purpose': 'PPA',

=== modified file 'lib/lp/soyuz/model/binarypackagebuildbehaviour.py'
--- lib/lp/soyuz/model/binarypackagebuildbehaviour.py	2017-04-29 23:51:28 +0000
+++ lib/lp/soyuz/model/binarypackagebuildbehaviour.py	2017-07-26 13:45:32 +0000
@@ -144,6 +144,7 @@
         args = {}
         args['arch_indep'] = build.arch_indep
         args['distribution'] = das.distroseries.distribution.name
+        args['series'] = das.distroseries.name
         args['suite'] = das.distroseries.getSuite(build.pocket)
         args['arch_tag'] = das.architecturetag
 

=== modified file 'lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py'
--- lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py	2017-04-29 23:51:28 +0000
+++ lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py	2017-07-26 13:45:32 +0000
@@ -140,6 +140,7 @@
             'build_debug_symbols': archive.build_debug_symbols,
             'ogrecomponent': component,
             'distribution': das.distroseries.distribution.name,
+            'series': ds_name,
             'suite': suite,
             'trusted_keys': trusted_keys,
             }


Follow ups