launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #29578
[Merge] ~xnox/launchpad:copy-signing-bool into launchpad:master
Dimitri John Ledkov has proposed merging ~xnox/launchpad:copy-signing-bool into launchpad:master.
Commit message:
Do not copy signing, when using packagecopier with distroseries init.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~xnox/launchpad/+git/launchpad/+merge/436161
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~xnox/launchpad:copy-signing-bool into launchpad:master.
diff --git a/lib/lp/soyuz/scripts/custom_uploads_copier.py b/lib/lp/soyuz/scripts/custom_uploads_copier.py
index 8eae9be..1578aca 100644
--- a/lib/lp/soyuz/scripts/custom_uploads_copier.py
+++ b/lib/lp/soyuz/scripts/custom_uploads_copier.py
@@ -49,10 +49,14 @@ class CustomUploadsCopier:
target_series,
target_pocket=PackagePublishingPocket.RELEASE,
target_archive=None,
+ copy_signing=True,
):
self.target_series = target_series
self.target_pocket = target_pocket
self.target_archive = target_archive
+ if not copy_signing:
+ del(copyable_types[PackageUploadCustomFormat.UEFI])
+ del(copyable_types[PackageUploadCustomFormat.SIGNING])
def isCopyable(self, upload):
"""Is `upload` the kind of `PackageUploadCustom` that we can copy?"""
diff --git a/lib/lp/soyuz/scripts/initialize_distroseries.py b/lib/lp/soyuz/scripts/initialize_distroseries.py
index 5ffe47d..86496ec 100644
--- a/lib/lp/soyuz/scripts/initialize_distroseries.py
+++ b/lib/lp/soyuz/scripts/initialize_distroseries.py
@@ -676,6 +676,7 @@ class InitializeDistroSeries:
close_bugs=False,
create_dsd_job=False,
person=None,
+ copy_signing=False,
)
)
if self.rebuild:
diff --git a/lib/lp/soyuz/scripts/packagecopier.py b/lib/lp/soyuz/scripts/packagecopier.py
index 372c52f..4a764c9 100644
--- a/lib/lp/soyuz/scripts/packagecopier.py
+++ b/lib/lp/soyuz/scripts/packagecopier.py
@@ -581,6 +581,7 @@ def do_copy(
phased_update_percentage=None,
move=False,
logger=None,
+ copy_signing=True,
):
"""Perform the complete copy of the given sources incrementally.
@@ -633,6 +634,8 @@ def do_copy(
:param move: If True, delete the source publication after copying to the
destination.
:param logger: An optional logger.
+ :param copy_signing: A boolean indicating whether or not to copy
+ signing custom upload types.
:raise CannotCopy when one or more copies were not allowed. The error
will contain the reason why each copy was denied.
@@ -741,6 +744,7 @@ def do_copy(
phased_update_percentage=phased_update_percentage,
move=move,
logger=logger,
+ copy_signing=copy_signing,
)
if send_email and sub_copies:
mailer = PackageUploadMailer.forAction(
@@ -790,6 +794,7 @@ def _do_direct_copy(
phased_update_percentage=None,
move=False,
logger=None,
+ copy_signing=True,
):
"""Copy publishing records to another location.
@@ -825,6 +830,8 @@ def _do_direct_copy(
:param move: If True, delete the source publication after copying to the
destination.
:param logger: An optional logger.
+ :param copy_signing: A boolean indicating whether or not to copy
+ signing custom upload types.
:return: a list of `ISourcePackagePublishingHistory` and
`BinaryPackagePublishingHistory` corresponding to the copied
@@ -903,7 +910,8 @@ def _do_direct_copy(
# Custom uploads aren't modelled as publication history records, so
# we have to send these through the upload queue.
custom_copier = CustomUploadsCopier(
- series, target_pocket=pocket, target_archive=archive
+ series, target_pocket=pocket, target_archive=archive,
+ copy_signing=copy_signing,
)
for custom in custom_files:
if custom_copier.isCopyable(custom):
References