From cb989615f0055ca287f306012e0dae07bfd1a368 Mon Sep 17 00:00:00 2001 From: Mateus Pegorim Date: Sat, 18 Jul 2026 22:40:11 -0300 Subject: [PATCH] Align MAX_SNAPSHOT_ENTRIES with Snapper retention (off-by-one) (#6175) * Align MAX_SNAPSHOT_ENTRIES with Snapper retention Snapper is configured with NUMBER_LIMIT="5", but limine-snapper-sync also counts the freshly-created / currently-booted snapshot, so five retained snapshots are reported as six entries and it warns on every snapshot and update: Snapshot limit mismatch: 6 Snapper snapshots exceed configured MAX_SNAPSHOT_ENTRIES=5 Raise MAX_SNAPSHOT_ENTRIES to 6 (NUMBER_LIMIT + 1) so the boot-menu cap and Snapper's retention agree and the off-by-one warning stops. (An alternative is MAX_SNAPSHOT_ENTRIES=auto, which derives the cap from Snapper directly; kept an explicit value here to preserve the existing boot-menu limit.) Co-Authored-By: Claude * Clarify Limine snapshot limit --------- Co-authored-by: Claude Co-authored-by: David Heinemeier Hansson --- etc/limine-entry-tool.d/omarchy-defaults.conf | 7 ++++++- test/shell.d/snapper-test.sh | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/etc/limine-entry-tool.d/omarchy-defaults.conf b/etc/limine-entry-tool.d/omarchy-defaults.conf index 01e4044c..798d0360 100644 --- a/etc/limine-entry-tool.d/omarchy-defaults.conf +++ b/etc/limine-entry-tool.d/omarchy-defaults.conf @@ -10,6 +10,11 @@ FIND_BOOTLOADERS=yes BOOT_ORDER="*, *fallback, Snapshots" -MAX_SNAPSHOT_ENTRIES=5 +# Snapper is configured with NUMBER_LIMIT="5" (see default/snapper/root), but +# limine-snapper-sync can see the newly created sixth snapshot before cleanup +# restores the retained snapshot count to 5. Allow for that creation window: +# Snapshot limit mismatch: 6 Snapper snapshots exceed configured +# MAX_SNAPSHOT_ENTRIES=5 +MAX_SNAPSHOT_ENTRIES=6 SNAPSHOT_FORMAT_CHOICE=5 diff --git a/test/shell.d/snapper-test.sh b/test/shell.d/snapper-test.sh index 71e19f61..2730543a 100644 --- a/test/shell.d/snapper-test.sh +++ b/test/shell.d/snapper-test.sh @@ -5,13 +5,15 @@ set -euo pipefail source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" template="$ROOT/default/snapper/root" +limine_defaults="$ROOT/etc/limine-entry-tool.d/omarchy-defaults.conf" limine_notify_autostart="$ROOT/config/autostart/limine-snapper-notify.desktop" grep -Fx 'NUMBER_CLEANUP="yes"' "$template" >/dev/null grep -Fx 'NUMBER_LIMIT="5"' "$template" >/dev/null grep -Fx 'TIMELINE_CREATE="no"' "$template" >/dev/null ! grep -Eq '^TIMELINE_(CLEANUP|LIMIT_)' "$template" || fail "Snapper template keeps timeline cleanup details out of the default config" -pass "Snapper template keeps update snapshots and disables timeline snapshots" +grep -Fx 'MAX_SNAPSHOT_ENTRIES=6' "$limine_defaults" >/dev/null || fail "Limine allows for a snapshot created before Snapper cleanup" +pass "Snapper and Limine retain update snapshots without a transient limit mismatch" grep -Fx '[Desktop Entry]' "$limine_notify_autostart" >/dev/null grep -Fx 'Hidden=true' "$limine_notify_autostart" >/dev/null