← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~cjwatson/launchpad-buildd:binarypackage-remove-distribution into launchpad-buildd:master

 

Colin Watson has proposed merging ~cjwatson/launchpad-buildd:binarypackage-remove-distribution into launchpad-buildd:master.

Commit message:
Remove unused "distribution" argument from the binarypackage manager

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad-buildd/+git/launchpad-buildd/+merge/435132

This was only used with the old internal sbuild fork, which we dropped in launchpad-buildd 127.
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~cjwatson/launchpad-buildd:binarypackage-remove-distribution into launchpad-buildd:master.
diff --git a/debian/changelog b/debian/changelog
index b306ecb..0ad4ac1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+launchpad-buildd (226) UNRELEASED; urgency=medium
+
+  * Remove unused "distribution" argument from the binarypackage manager.
+    This was only used with the old internal sbuild fork, which we dropped
+    in launchpad-buildd 127.
+
+ -- Colin Watson <cjwatson@xxxxxxxxxx>  Wed, 04 Jan 2023 12:58:36 +0000
+
 launchpad-buildd (225) focal; urgency=medium
 
   * Fix add-trusted-keys regression due to Backend.open calling "lxc exec"
diff --git a/lpbuildd/binarypackage.py b/lpbuildd/binarypackage.py
index 3498e58..22af94c 100644
--- a/lpbuildd/binarypackage.py
+++ b/lpbuildd/binarypackage.py
@@ -118,7 +118,6 @@ class BinaryPackageBuildManager(DebianBuildManager):
             raise ValueError(files)
 
         self.archive_purpose = extra_args.get('archive_purpose')
-        self.distribution = extra_args['distribution']
         self.suite = extra_args['suite']
         self.component = extra_args['ogrecomponent']
         self.arch_indep = extra_args.get('arch_indep', False)
diff --git a/lpbuildd/tests/test_binarypackage.py b/lpbuildd/tests/test_binarypackage.py
index 9b1a0fa..28b782d 100644
--- a/lpbuildd/tests/test_binarypackage.py
+++ b/lpbuildd/tests/test_binarypackage.py
@@ -118,8 +118,7 @@ class TestBinaryPackageBuildManagerIteration(TestCase):
         # after INIT.
         self.buildmanager.initiate(
             {'foo_1.dsc': dscname}, 'chroot.tar.gz',
-            {'distribution': 'ubuntu', 'series': 'warty', 'suite': 'warty',
-             'ogrecomponent': 'main'})
+            {'series': 'warty', 'suite': 'warty', 'ogrecomponent': 'main'})
 
         os.makedirs(self.chrootdir)
 
@@ -204,7 +203,7 @@ class TestBinaryPackageBuildManagerIteration(TestCase):
         self.buildmanager.backend_name = 'fake'
         self.buildmanager.initiate(
             {'foo_1.dsc': ''}, 'chroot.tar.gz',
-            {'distribution': 'ubuntu', 'series': 'warty', 'suite': 'warty',
+            {'series': 'warty', 'suite': 'warty',
              'ogrecomponent': 'main', 'archive_purpose': 'PRIMARY',
              'build_debug_symbols': True})
         os.makedirs(self.chrootdir)
@@ -239,7 +238,7 @@ class TestBinaryPackageBuildManagerIteration(TestCase):
         self.buildmanager.backend_name = 'fake'
         self.buildmanager.initiate(
             {'foo_1.dsc': ''}, 'chroot.tar.gz',
-            {'distribution': 'ubuntu', 'series': 'warty', 'suite': 'warty',
+            {'series': 'warty', 'suite': 'warty',
              'ogrecomponent': 'main', 'archive_purpose': 'PRIMARY',
              'build_debug_symbols': False})
         os.makedirs(self.chrootdir)
@@ -330,8 +329,7 @@ class TestBinaryPackageBuildManagerIteration(TestCase):
         # pretends that it was terminated by a signal.
         self.buildmanager.initiate(
             {'foo_1.dsc': ''}, 'chroot.tar.gz',
-            {'distribution': 'ubuntu', 'series': 'warty', 'suite': 'warty',
-             'ogrecomponent': 'main'})
+            {'series': 'warty', 'suite': 'warty', 'ogrecomponent': 'main'})
 
         self.buildmanager.abort()
         self.assertState(
@@ -552,7 +550,7 @@ class TestBinaryPackageBuildManagerIteration(TestCase):
         # returns those relevant to the current architecture.
         self.buildmanager.initiate(
             {'foo_1.dsc': ''}, 'chroot.tar.gz',
-            {'distribution': 'ubuntu', 'series': 'warty', 'suite': 'warty',
+            {'series': 'warty', 'suite': 'warty',
              'ogrecomponent': 'main', 'arch_tag': 'i386'})
         self.assertEqual(
             "foo (>= 1)",
@@ -566,7 +564,7 @@ class TestBinaryPackageBuildManagerIteration(TestCase):
         # from the unsatisfied build-dependencies it returns.
         self.buildmanager.initiate(
             {'foo_1.dsc': ''}, 'chroot.tar.gz',
-            {'distribution': 'ubuntu', 'series': 'warty', 'suite': 'warty',
+            {'series': 'warty', 'suite': 'warty',
              'ogrecomponent': 'main', 'arch_tag': 'i386'})
         self.assertEqual(
             "foo",
@@ -580,7 +578,7 @@ class TestBinaryPackageBuildManagerIteration(TestCase):
         # that evaluate to true when no build profiles are active.
         self.buildmanager.initiate(
             {'foo_1.dsc': ''}, 'chroot.tar.gz',
-            {'distribution': 'ubuntu', 'series': 'warty', 'suite': 'warty',
+            {'series': 'warty', 'suite': 'warty',
              'ogrecomponent': 'main', 'arch_tag': 'i386'})
         self.assertEqual(
             "foo",