← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/bpbb-distribution into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/bpbb-distribution into lp:launchpad.

Commit message:
Pass the distribution name to the builder slave from BinaryPackageBuildBehaviour, so that it can be used for ddebs and translations.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)
Related bugs:
  Bug #1348077 in Launchpad itself: "buildd slave config hardcodes --archive=ubuntu"
  https://bugs.launchpad.net/launchpad/+bug/1348077

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/bpbb-distribution/+merge/228093

launchpad-buildd puts the distribution name into ddebs.txt and translations.txt.  At the moment this is effectively hardcoded to "ubuntu" (because of hardcoding in template-buildd-slave.conf).  Pass the distribution name down from the master so that we can fix this properly.

No QA required at this stage; we'll sort out QA when dealing with the buildd side.
-- 
https://code.launchpad.net/~cjwatson/launchpad/bpbb-distribution/+merge/228093
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/bpbb-distribution into lp:launchpad.
=== modified file 'lib/lp/soyuz/model/binarypackagebuildbehaviour.py'
--- lib/lp/soyuz/model/binarypackagebuildbehaviour.py	2014-06-25 11:37:48 +0000
+++ lib/lp/soyuz/model/binarypackagebuildbehaviour.py	2014-07-24 11:34:28 +0000
@@ -135,16 +135,18 @@
         """
         Return the extra arguments required by the slave for the given build.
         """
+        das = build.distro_arch_series
+
         # Build extra arguments.
         args = {}
         # turn 'arch_indep' ON only if build is archindep or if
         # the specific architecture is the nominatedarchindep for
         # this distroseries (in case it requires any archindep source)
-        args['arch_indep'] = build.distro_arch_series.isNominatedArchIndep
+        args['arch_indep'] = das.isNominatedArchIndep
 
-        args['suite'] = build.distro_arch_series.distroseries.getSuite(
-            build.pocket)
-        args['arch_tag'] = build.distro_arch_series.architecturetag
+        args['distribution'] = das.distroseries.distribution.name
+        args['suite'] = das.distroseries.getSuite(build.pocket)
+        args['arch_tag'] = das.architecturetag
 
         archive_purpose = build.archive.purpose
         if (archive_purpose == ArchivePurpose.PPA and
@@ -162,8 +164,8 @@
             args["ogrecomponent"] = (
                 build.current_component.name)
 
-        args['archives'] = get_sources_list_for_building(build,
-            build.distro_arch_series, build.source_package_release.name)
+        args['archives'] = get_sources_list_for_building(
+            build, das, build.source_package_release.name)
         args['archive_private'] = build.archive.private
         args['build_debug_symbols'] = build.archive.build_debug_symbols
 

=== modified file 'lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py'
--- lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py	2014-06-26 10:35:55 +0000
+++ lib/lp/soyuz/tests/test_binarypackagebuildbehaviour.py	2014-07-24 11:34:28 +0000
@@ -21,7 +21,6 @@
 from lp.archivepublisher.diskpool import poolify
 from lp.buildmaster.enums import (
     BuilderCleanStatus,
-    BuildQueueStatus,
     BuildStatus,
     )
 from lp.buildmaster.interactor import (
@@ -104,12 +103,12 @@
             in order to trick the slave into building correctly.
         :return: A list of the calls we expect to be made.
         """
-        ds_name = build.distro_arch_series.distroseries.name
+        das = build.distro_arch_series
+        ds_name = das.distroseries.name
         suite = ds_name + pocketsuffix[build.pocket]
         archives = get_sources_list_for_building(
-            build, build.distro_arch_series,
-            build.source_package_release.name)
-        arch_indep = build.distro_arch_series.isNominatedArchIndep
+            build, das, build.source_package_release.name)
+        arch_indep = das.isNominatedArchIndep
         if component is None:
             component = build.current_component.name
         if filemap_names is None:
@@ -123,12 +122,13 @@
 
         extra_args = {
             'arch_indep': arch_indep,
-            'arch_tag': build.distro_arch_series.architecturetag,
+            'arch_tag': das.architecturetag,
             'archive_private': archive.private,
             'archive_purpose': archive_purpose.name,
             'archives': archives,
             'build_debug_symbols': archive.build_debug_symbols,
             'ogrecomponent': component,
+            'distribution': das.distroseries.distribution.name,
             'suite': suite,
             }
         build_log = [


Follow ups