← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~cjwatson/launchpad/buildinfo-arch-indep into lp:launchpad

 

Colin Watson has proposed merging lp:~cjwatson/launchpad/buildinfo-arch-indep into lp:launchpad.

Commit message:
Stop caring about arch-dep/indep-ness of buildinfo files.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/buildinfo-arch-indep/+merge/322974
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/buildinfo-arch-indep into lp:launchpad.
=== modified file 'lib/lp/archiveuploader/nascentupload.py'
--- lib/lp/archiveuploader/nascentupload.py	2017-04-21 12:01:48 +0000
+++ lib/lp/archiveuploader/nascentupload.py	2017-04-21 15:28:50 +0000
@@ -273,10 +273,6 @@
                     files_sourceful or uploaded_file.is_sourceful)
                 if uploaded_file.is_binaryful:
                     files_binaryful = files_binaryful or True
-                    files_archindep = (
-                        files_archindep or uploaded_file.is_archindep)
-                    files_archdep = (
-                        files_archdep or not uploaded_file.is_archindep)
             else:
                 # This is already caught in ChangesFile.__init__
                 raise AssertionError("Unknown uploaded file type.")

=== added directory 'lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep'
=== added file 'lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar-bin_1.0-1_all.deb'
Binary files lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar-bin_1.0-1_all.deb	1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar-bin_1.0-1_all.deb	2017-04-21 15:28:50 +0000 differ
=== added file 'lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar_1.0-1_all.deb'
Binary files lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar_1.0-1_all.deb	1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar_1.0-1_all.deb	2017-04-21 15:28:50 +0000 differ
=== added file 'lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar_1.0-1_i386.buildinfo'
--- lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar_1.0-1_i386.buildinfo	1970-01-01 00:00:00 +0000
+++ lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar_1.0-1_i386.buildinfo	2017-04-21 15:28:50 +0000
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+Format: 1.0
+Source: bar
+Binary: bar bar-bin
+Architecture: all
+Version: 1.0-1
+Checksums-Md5:
+ f04e89380d7f497598445578d603ac42 686 bar_1.0-1_all.deb
+ 1243f86ac9edf549068be2330714d34f 702 bar-bin_1.0-1_all.deb
+Build-Origin: Ubuntu
+Build-Architecture: i386
+Build-Date: Wed, 29 Mar 2017 00:01:21 +0100
+Installed-Build-Depends:
+ dpkg (= 1.18.22),
+ dpkg-dev (= 1.18.22)
+
+-----BEGIN PGP SIGNATURE-----
+
+iF0EARECAB0WIQQ0DKO7Jw4nFsnuC3aOfrcIbGSoxQUCWPohzwAKCRCOfrcIbGSo
+xYXSAJ9/VXDvuiietTwW+1p2UYxwGB2olACglZ2bwon7jgVH+lLUKTPJsyZLYAo=
+=75Ve
+-----END PGP SIGNATURE-----

=== added file 'lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar_1.0-1_i386.changes'
--- lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar_1.0-1_i386.changes	1970-01-01 00:00:00 +0000
+++ lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo_indep/bar_1.0-1_i386.changes	2017-04-21 15:28:50 +0000
@@ -0,0 +1,30 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+Format: 1.7
+Date: Thu, 16 Feb 2006 15:34:09 +0000
+Source: bar
+Binary: bar bar-bin
+Architecture: all
+Version: 1.0-1
+Distribution: breezy
+Urgency: low
+Maintainer: Launchpad team <launchpad@xxxxxxxxxxxxxxxxxxx>
+Changed-By: Daniel Silverstone <daniel.silverstone@xxxxxxxxxxxxx>
+Description: 
+ bar        - Stuff for testing
+Changes: 
+ bar (1.0-1) breezy; urgency=low
+ .
+   * Initial version
+Files: 
+ f04e89380d7f497598445578d603ac42 686 devel optional bar_1.0-1_all.deb
+ 1243f86ac9edf549068be2330714d34f 702 devel optional bar-bin_1.0-1_all.deb
+ bc616663d3222e8f9b60290d41de4487 607 devel optional bar_1.0-1_i386.buildinfo
+
+-----BEGIN PGP SIGNATURE-----
+
+iF0EARECAB0WIQQ0DKO7Jw4nFsnuC3aOfrcIbGSoxQUCWPoh0gAKCRCOfrcIbGSo
+xQn9AJ9pHkMCgLX/xPOsjif7KAnXN8t6zwCcDNtmy1Bm1JdNs3JKN4YFWu72pbk=
+=e1QJ
+-----END PGP SIGNATURE-----

=== modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_uploadprocessor.py	2017-04-21 12:01:48 +0000
+++ lib/lp/archiveuploader/tests/test_uploadprocessor.py	2017-04-21 15:28:50 +0000
@@ -2061,6 +2061,37 @@
         self.assertEqual(BuildStatus.FULLYBUILT, build.status)
         self.assertEqual(buildinfo_contents, build.buildinfo.read())
 
+    def test_binary_buildinfo_arch_indep(self):
+        # A buildinfo file for an arch-indep build is attached to the BPB.
+        uploadprocessor = self.setupBreezyAndGetUploadProcessor()
+        upload_dir = self.queueUpload("bar_1.0-1")
+        self.processUpload(uploadprocessor, upload_dir)
+        source_pub = self.publishPackage("bar", "1.0-1")
+        [build] = source_pub.createMissingBuilds()
+        self.switchToAdmin()
+        [queue_item] = self.breezy.getPackageUploads(
+            status=PackageUploadStatus.ACCEPTED,
+            version=u"1.0-1", name=u"bar")
+        queue_item.setDone()
+        build.buildqueue_record.markAsBuilding(self.factory.makeBuilder())
+        build.updateStatus(
+            BuildStatus.UPLOADING, builder=build.buildqueue_record.builder)
+        self.switchToUploader()
+        shutil.rmtree(upload_dir)
+        self.layer.txn.commit()
+        behaviour = IBuildFarmJobBehaviour(build)
+        leaf_name = behaviour.getUploadDirLeaf(build.build_cookie)
+        upload_dir = self.queueUpload(
+            "bar_1.0-1_binary_buildinfo_indep", queue_entry=leaf_name)
+        with open(os.path.join(upload_dir, "bar_1.0-1_i386.buildinfo")) as f:
+            buildinfo_contents = f.read()
+        self.options.context = "buildd"
+        self.options.builds = True
+        BuildUploadHandler(
+            uploadprocessor, self.incoming_folder, leaf_name).process()
+        self.assertEqual(BuildStatus.FULLYBUILT, build.status)
+        self.assertEqual(buildinfo_contents, build.buildinfo.read())
+
 
 class TestUploadHandler(TestUploadProcessorBase):
 


Follow ups