From 533ea641d8386668396edcee393f5fa38edf7709 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubom=C3=ADr=20Sedl=C3=A1=C5=99?= Date: Tue, 13 Feb 2024 10:35:47 +0100 Subject: [PATCH] Fix buildinstall reuse with pungi_buildinstall plugin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The keys may not exist anymore. If there's nothing to delete, it's fine. JIRA: RHELCMP-13464 Signed-off-by: Lubomír Sedlář (cherry picked from commit 52c2cea0efbd893eb48af2a8f11a296f4b47b39b) --- pungi/phases/buildinstall.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pungi/phases/buildinstall.py b/pungi/phases/buildinstall.py index 136134ec..7dddafb1 100644 --- a/pungi/phases/buildinstall.py +++ b/pungi/phases/buildinstall.py @@ -716,8 +716,8 @@ class BuildinstallThread(WorkerThread): # input on RPM level. cmd_copy = copy(cmd) for key in ["outputdir", "sources"]: - del cmd_copy[key] - del old_metadata["cmd"][key] + cmd_copy.pop(key, None) + old_metadata["cmd"].pop(key, None) # Do not reuse if command line arguments are not the same. if old_metadata["cmd"] != cmd_copy: