From 4cd1218a11910c62f49d7a1bb649eeb75fe3febd Mon Sep 17 00:00:00 2001 From: Packit Service Date: Dec 09 2020 08:49:25 +0000 Subject: Apply patch 0006-boom-check-for-duplicates-in-edit_entry.patch patch_name: 0006-boom-check-for-duplicates-in-edit_entry.patch present_in_specfile: true --- diff --git a/boom/command.py b/boom/command.py index 165a8a8..c164b33 100644 --- a/boom/command.py +++ b/boom/command.py @@ -927,6 +927,11 @@ def edit_entry(selection=None, title=None, version=None, machine_id=None, be.initrd = _cache_image(be.initrd, images == I_BACKUP) be.linux = _cache_image(be.linux, images == I_BACKUP) + # Is the entry now identical to an existing entry? + if len(find_entries(Selection(boot_id=be.boot_id))) > 1: + raise ValueError("Entry already exists (boot_id=%s)." % + be.disp_boot_id) + be.update_entry(expand=expand) __write_legacy()