From a7c7fe5af3f2cdf7c644f4714a7ae20e6865f735 Mon Sep 17 00:00:00 2001 From: Federico Pellegrin Date: Sun, 20 Oct 2024 14:22:48 +0200 Subject: [PATCH] Skip retrieval of gpg key if container signing is not configured If the tool or signing project is not configured, skip all together searching for a pubkey, as that will then die and the container publishing will not proceed further. If configured just behave correctly as before. --- src/backend/BSPublisher/Container.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/backend/BSPublisher/Container.pm b/src/backend/BSPublisher/Container.pm index 9e5f2c45b70..754305c6b3e 100644 --- a/src/backend/BSPublisher/Container.pm +++ b/src/backend/BSPublisher/Container.pm @@ -178,8 +178,12 @@ sub upload_all_containers { $isdelete = 1; $containers = {}; } else { - my ($pubkey, $signargs) = get_notary_pubkey($projid, $data->{'pubkey'}, $data->{'signargs'}, $data->{'signflavor'}); - $data = { %$data, 'pubkey' => $pubkey, 'signargs' => $signargs }; + if ($BSConfig::sign_project && $BSConfig::sign) { + my ($pubkey, $signargs) = get_notary_pubkey($projid, $data->{'pubkey'}, $data->{'signargs'}, $data->{'signflavor'}); + $data = { %$data, 'pubkey' => $pubkey, 'signargs' => $signargs }; + } else { + $data = {}; + } } my $notary_uploads = {};