launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #21505
[Merge] lp:~cjwatson/launchpad/buildinfo-multiple-binary into lp:launchpad
Colin Watson has proposed merging lp:~cjwatson/launchpad/buildinfo-multiple-binary into lp:launchpad.
Commit message:
Fix handling of multi-binary uploads with buildinfo.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~cjwatson/launchpad/buildinfo-multiple-binary/+merge/322956
--
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~cjwatson/launchpad/buildinfo-multiple-binary into lp:launchpad.
=== modified file 'lib/lp/archiveuploader/nascentupload.py'
--- lib/lp/archiveuploader/nascentupload.py 2017-03-29 09:28:09 +0000
+++ lib/lp/archiveuploader/nascentupload.py 2017-04-21 12:24:57 +0000
@@ -1,4 +1,4 @@
-# Copyright 2009-2014 Canonical Ltd. This software is licensed under the
+# Copyright 2009-2017 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""The processing of nascent uploads.
@@ -867,7 +867,8 @@
assert self.queue_root.pocket == bpf_build.pocket, (
"Binary was not build for the claimed pocket.")
binary_package_file.storeInDatabase(bpf_build)
- if self.changes.buildinfo is not None:
+ if (self.changes.buildinfo is not None and
+ bpf_build.buildinfo is None):
self.changes.buildinfo.checkBuild(bpf_build)
bpf_build.addBuildInfo(
self.changes.buildinfo.storeInDatabase())
=== added file 'lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo/bar-bin_1.0-1_i386.deb'
Binary files lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo/bar-bin_1.0-1_i386.deb 1970-01-01 00:00:00 +0000 and lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo/bar-bin_1.0-1_i386.deb 2017-04-21 12:24:57 +0000 differ
=== modified file 'lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo/bar_1.0-1_i386.buildinfo'
--- lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo/bar_1.0-1_i386.buildinfo 2017-03-29 22:34:48 +0000
+++ lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo/bar_1.0-1_i386.buildinfo 2017-04-21 12:24:57 +0000
@@ -3,11 +3,12 @@
Format: 1.0
Source: bar
-Binary: bar
+Binary: bar bar-bin
Architecture: i386
Version: 1.0-1
Checksums-Md5:
39a6dde58f0b84139e9877892f6ac56a 644 bar_1.0-1_i386.deb
+ 79b22a9047bae498f37b58adde5b1f1c 660 bar-bin_1.0-1_i386.deb
Build-Origin: Ubuntu
Build-Architecture: i386
Build-Date: Wed, 29 Mar 2017 00:01:21 +0100
@@ -17,7 +18,7 @@
-----BEGIN PGP SIGNATURE-----
-iF0EARECAB0WIQQ0DKO7Jw4nFsnuC3aOfrcIbGSoxQUCWNwqmQAKCRCOfrcIbGSo
-xc7HAJ9JMKX0NRHSvhaY11jKITVazztw6QCfdQAKsVEzM6tIRNUIwfJnOi7N2Pg=
-=aQ0x
+iF0EARECAB0WIQQ0DKO7Jw4nFsnuC3aOfrcIbGSoxQUCWPnwPQAKCRCOfrcIbGSo
+xQr7AKCateEy6YhIpQTc4CkOWZ2fof67agCeLkFgSIIOocMegMRNo7JYxS98pn8=
+=YPRu
-----END PGP SIGNATURE-----
=== modified file 'lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo/bar_1.0-1_i386.changes'
--- lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo/bar_1.0-1_i386.changes 2017-03-29 22:34:48 +0000
+++ lib/lp/archiveuploader/tests/data/suite/bar_1.0-1_binary_buildinfo/bar_1.0-1_i386.changes 2017-04-21 12:24:57 +0000
@@ -4,7 +4,7 @@
Format: 1.7
Date: Thu, 16 Feb 2006 15:34:09 +0000
Source: bar
-Binary: bar
+Binary: bar bar-bin
Architecture: i386
Version: 1.0-1
Distribution: breezy
@@ -19,11 +19,12 @@
* Initial version
Files:
39a6dde58f0b84139e9877892f6ac56a 644 devel optional bar_1.0-1_i386.deb
- fa48116db5bb103a310e7e5ffd6a14f4 541 devel optional bar_1.0-1_i386.buildinfo
+ 79b22a9047bae498f37b58adde5b1f1c 660 devel optional bar-bin_1.0-1_i386.deb
+ f0dfbb33531a080faddac73c964bd77d 610 devel optional bar_1.0-1_i386.buildinfo
-----BEGIN PGP SIGNATURE-----
-iF0EARECAB0WIQQ0DKO7Jw4nFsnuC3aOfrcIbGSoxQUCWNwqmQAKCRCOfrcIbGSo
-xfGYAJ9ha1G54CIb6L+RNtt2Y1BoCc8NfgCfbNqjebToNPL5Egxd0U7nfC+yzlA=
-=WNoA
+iF0EARECAB0WIQQ0DKO7Jw4nFsnuC3aOfrcIbGSoxQUCWPnwRQAKCRCOfrcIbGSo
+xX9kAJ4mbB557c+O+JLyCkEbaCtCMPQ50ACeNCoTSLQW2AkI8jIeL/geTJX6E04=
+=Xs+1
-----END PGP SIGNATURE-----
=== modified file 'lib/lp/archiveuploader/tests/test_uploadprocessor.py'
--- lib/lp/archiveuploader/tests/test_uploadprocessor.py 2017-03-29 09:28:09 +0000
+++ lib/lp/archiveuploader/tests/test_uploadprocessor.py 2017-04-21 12:24:57 +0000
@@ -2043,7 +2043,8 @@
version=u"1.0-1", name=u"bar")
queue_item.setDone()
build.buildqueue_record.markAsBuilding(self.factory.makeBuilder())
- build.updateStatus(BuildStatus.UPLOADING)
+ build.updateStatus(
+ BuildStatus.UPLOADING, builder=build.buildqueue_record.builder)
self.switchToUploader()
shutil.rmtree(upload_dir)
self.layer.txn.commit()
@@ -2057,6 +2058,7 @@
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())
Follow ups