Merge ~pelpsi/launchpad:unembargo-buildinfo-file into launchpad:master

Proposed by Simone Pelosi
Status: Merged
Approved by: Simone Pelosi
Approved revision: fe36f46709b2c9c5abf959060d72fb1e4a6ae2a2
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~pelpsi/launchpad:unembargo-buildinfo-file
Merge into: launchpad:master
Diff against target: 38 lines (+9/-0)
2 files modified
lib/lp/soyuz/scripts/packagecopier.py (+2/-0)
lib/lp/soyuz/tests/test_packagecopyjob.py (+7/-0)
Reviewer Review Type Date Requested Status
William Grant code Approve
Review via email: mp+464838@code.launchpad.net

Commit message

Unembargo build info

Added buildinfo to unembargoed files.

LP: #2052796

To post a comment you must log in.
Revision history for this message
William Grant (wgrant) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/lib/lp/soyuz/scripts/packagecopier.py b/lib/lp/soyuz/scripts/packagecopier.py
index f377107..bc31af0 100644
--- a/lib/lp/soyuz/scripts/packagecopier.py
+++ b/lib/lp/soyuz/scripts/packagecopier.py
@@ -87,6 +87,8 @@ def update_files_privacy(pub_record):
87 package_files.append((package_upload, "changesfile"))87 package_files.append((package_upload, "changesfile"))
88 # Unrestrict the buildlog file as necessary.88 # Unrestrict the buildlog file as necessary.
89 package_files.append((build, "log"))89 package_files.append((build, "log"))
90 # Unrestrict the buildinfo file as necessary.
91 package_files.append((build, "buildinfo"))
90 elif IPackageUploadCustom.providedBy(pub_record):92 elif IPackageUploadCustom.providedBy(pub_record):
91 # Unrestrict the custom files included93 # Unrestrict the custom files included
92 package_files.append((pub_record, "libraryfilealias"))94 package_files.append((pub_record, "libraryfilealias"))
diff --git a/lib/lp/soyuz/tests/test_packagecopyjob.py b/lib/lp/soyuz/tests/test_packagecopyjob.py
index 26fdd08..033dd6a 100644
--- a/lib/lp/soyuz/tests/test_packagecopyjob.py
+++ b/lib/lp/soyuz/tests/test_packagecopyjob.py
@@ -1757,6 +1757,12 @@ class PlainPackageCopyJobTests(TestCaseWithFactory, LocalTestHelper):
1757 distroseries=self.distroseries,1757 distroseries=self.distroseries,
1758 status=PackagePublishingStatus.PUBLISHED,1758 status=PackagePublishingStatus.PUBLISHED,
1759 )1759 )
1760 [build] = spph.getBuilds()
1761 build.addBuildInfo(
1762 self.factory.makeLibraryFileAlias(
1763 filename="build_info.info", restricted=True
1764 )
1765 )
1760 spr = spph.sourcepackagerelease1766 spr = spph.sourcepackagerelease
1761 for source_file in spr.files:1767 for source_file in spr.files:
1762 self.assertTrue(source_file.libraryfile.restricted)1768 self.assertTrue(source_file.libraryfile.restricted)
@@ -1837,6 +1843,7 @@ class PlainPackageCopyJobTests(TestCaseWithFactory, LocalTestHelper):
1837 copied_build = copied_binary.binarypackagerelease.build1843 copied_build = copied_binary.binarypackagerelease.build
1838 self.assertFalse(copied_build.upload_changesfile.restricted)1844 self.assertFalse(copied_build.upload_changesfile.restricted)
1839 self.assertFalse(copied_build.log.restricted)1845 self.assertFalse(copied_build.log.restricted)
1846 self.assertFalse(copied_build.buildinfo.restricted)
18401847
1841 def test_copy_custom_upload_files(self):1848 def test_copy_custom_upload_files(self):
1842 # Copyable custom upload files are queued for republication when1849 # Copyable custom upload files are queued for republication when

Subscribers

People subscribed via source and target branches

to status/vote changes: