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

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