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

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