Blame SOURCES/0006-boom-check-for-duplicates-in-edit_entry.patch

55fd57
 boom/command.py | 5 +++++
55fd57
 1 file changed, 5 insertions(+)
55fd57
55fd57
diff --git a/boom/command.py b/boom/command.py
55fd57
index 165a8a8..c164b33 100644
55fd57
--- a/boom/command.py
55fd57
+++ b/boom/command.py
55fd57
@@ -927,6 +927,11 @@ def edit_entry(selection=None, title=None, version=None, machine_id=None,
55fd57
         be.initrd = _cache_image(be.initrd, images == I_BACKUP)
55fd57
         be.linux = _cache_image(be.linux, images == I_BACKUP)
55fd57
 
55fd57
+    # Is the entry now identical to an existing entry?
55fd57
+    if len(find_entries(Selection(boot_id=be.boot_id))) > 1:
55fd57
+        raise ValueError("Entry already exists (boot_id=%s)." %
55fd57
+                         be.disp_boot_id)
55fd57
+
55fd57
     be.update_entry(expand=expand)
55fd57
     __write_legacy()
55fd57