launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #15589
[Merge] lp:~stevenk/launchpad/deny-ddeb-deletion into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/deny-ddeb-deletion into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #1179330 in Launchpad itself: "DDEBs can be deleted or overridden separately"
https://bugs.launchpad.net/launchpad/+bug/1179330
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/deny-ddeb-deletion/+merge/163633
Reject deletion of a debug deb directly -- they should be removed when their deb is.
--
https://code.launchpad.net/~stevenk/launchpad/deny-ddeb-deletion/+merge/163633
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/deny-ddeb-deletion into lp:launchpad.
=== modified file 'lib/lp/soyuz/model/publishing.py'
--- lib/lp/soyuz/model/publishing.py 2013-05-08 06:18:50 +0000
+++ lib/lp/soyuz/model/publishing.py 2013-05-14 04:54:26 +0000
@@ -1300,6 +1300,10 @@
"Cannot delete publications from suite '%s'" %
self.distroseries.getSuite(self.pocket))
+ bpr = self.binarypackagerelease
+ if bpr.binpackageformat == BinaryPackageFormat.DDEB:
+ raise DeletionError("Cannot delete ddebs directly.")
+
self.setDeleted(removed_by, removal_comment)
def binaryFileUrls(self, include_meta=False):
=== modified file 'lib/lp/soyuz/tests/test_publishing.py'
--- lib/lp/soyuz/tests/test_publishing.py 2013-05-08 06:08:37 +0000
+++ lib/lp/soyuz/tests/test_publishing.py 2013-05-14 04:54:26 +0000
@@ -1056,6 +1056,13 @@
[new_bpph])
self.assertEqual(new_debug_bpph.section, new_section)
+ def test_requestDeletion_forbids_debug_package(self):
+ bpph, debug_bpph = self.factory.makeBinaryPackagePublishingHistory(
+ pocket=PackagePublishingPocket.RELEASE, with_debug=True)
+ self.assertRaisesWithContent(
+ DeletionError, 'Cannot delete ddebs directly.',
+ debug_bpph.requestDeletion, self.factory.makePerson())
+
class TestSourceDomination(TestNativePublishingBase):
"""Test SourcePackagePublishingHistory.supersede() operates correctly."""
Follow ups