Invalidate the display rebuild marker before repairing its drop-in
A pending migration must rebuild after restoring its missing display configuration even when another user previously completed the machine-wide rebuild. Remove the fixed marker before writing the drop-in so failed writes and builds remain retryable. Fresh installation already rebuilds after hardware setup through the ISO finalizer. Co-Authored-By: GPT-6.1-Sol XHigh <noreply@openai.com> Co-Authored-By: Greptile <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
8f7dd71fda
commit
81df05533c
3 files changed
+20
-4
No files matched your search
@@ -1,8 +1,11 @@
|
|||||||
if omarchy-hw-dell-xps13-dx13260-ptl; then
|
if omarchy-hw-dell-xps13-dx13260-ptl; then
|
||||||
display_conf="/etc/limine-entry-tool.d/dell-xps13-ptl-display.conf"
|
display_conf="/etc/limine-entry-tool.d/dell-xps13-ptl-display.conf"
|
||||||
|
display_rebuild_marker="/var/lib/omarchy/migrations/1790916392"
|
||||||
display_cmdline='KERNEL_CMDLINE[default]+=" xe.enable_psr2_sel_fetch=0 xe.enable_panel_replay=0"'
|
display_cmdline='KERNEL_CMDLINE[default]+=" xe.enable_psr2_sel_fetch=0 xe.enable_panel_replay=0"'
|
||||||
|
|
||||||
if [[ ! -f $display_conf ]] || ! grep -Fxq "$display_cmdline" "$display_conf"; then
|
if [[ ! -f $display_conf ]] || ! grep -Fxq "$display_cmdline" "$display_conf"; then
|
||||||
|
# A repaired drop-in invalidates the previous boot image rebuild.
|
||||||
|
sudo rm -f "$display_rebuild_marker"
|
||||||
sudo mkdir -p /etc/limine-entry-tool.d
|
sudo mkdir -p /etc/limine-entry-tool.d
|
||||||
printf '%s\n' '# Dell XPS 13 Panther Lake display workaround' "$display_cmdline" |
|
printf '%s\n' '# Dell XPS 13 Panther Lake display workaround' "$display_cmdline" |
|
||||||
sudo tee "$display_conf" >/dev/null
|
sudo tee "$display_conf" >/dev/null
|
||||||
|
|||||||
@@ -3,8 +3,6 @@ echo "Apply the Dell XPS 13 Panther Lake display workaround"
|
|||||||
if omarchy-hw-dell-xps13-dx13260-ptl; then
|
if omarchy-hw-dell-xps13-dx13260-ptl; then
|
||||||
source "$OMARCHY_PATH/install/hardware/dell-xps13-ptl-display.sh"
|
source "$OMARCHY_PATH/install/hardware/dell-xps13-ptl-display.sh"
|
||||||
|
|
||||||
display_rebuild_marker="/var/lib/omarchy/migrations/1790916392"
|
|
||||||
|
|
||||||
# Record a successful machine-wide rebuild so other users do not repeat it.
|
# Record a successful machine-wide rebuild so other users do not repeat it.
|
||||||
if [[ ! -e $display_rebuild_marker ]]; then
|
if [[ ! -e $display_rebuild_marker ]]; then
|
||||||
if ! display_rebuild_output=$(sudo limine-mkinitcpio 2>&1); then
|
if ! display_rebuild_output=$(sudo limine-mkinitcpio 2>&1); then
|
||||||
|
|||||||
@@ -27,9 +27,9 @@ display_conf="$test_tmp/limine/dell-xps13-ptl-display.conf"
|
|||||||
rebuild_marker="$test_tmp/rebuilt"
|
rebuild_marker="$test_tmp/rebuilt"
|
||||||
running_cmdline="$test_tmp/cmdline"
|
running_cmdline="$test_tmp/cmdline"
|
||||||
redirect_path '"/etc/limine-entry-tool.d/dell-xps13-ptl-display.conf"' "$display_conf" <"$leaf" |
|
redirect_path '"/etc/limine-entry-tool.d/dell-xps13-ptl-display.conf"' "$display_conf" <"$leaf" |
|
||||||
|
redirect_path '"/var/lib/omarchy/migrations/1790916392"' "$rebuild_marker" |
|
||||||
redirect_path '/etc/limine-entry-tool.d$' "$test_tmp/limine" >"$OMARCHY_PATH/install/hardware/${leaf##*/}"
|
redirect_path '/etc/limine-entry-tool.d$' "$test_tmp/limine" >"$OMARCHY_PATH/install/hardware/${leaf##*/}"
|
||||||
redirect_path '"/var/lib/omarchy/migrations/1790916392"' "$rebuild_marker" <"$migration" |
|
redirect_path '/proc/cmdline' "$running_cmdline" <"$migration" >"$test_tmp/migration.sh"
|
||||||
redirect_path '/proc/cmdline' "$running_cmdline" >"$test_tmp/migration.sh"
|
|
||||||
|
|
||||||
cat >"$test_tmp/bin/omarchy-hw-match" <<'SH'
|
cat >"$test_tmp/bin/omarchy-hw-match" <<'SH'
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
@@ -125,3 +125,18 @@ printf '%s\n' "$expected_cmdline" >"$running_cmdline"
|
|||||||
run_migration
|
run_migration
|
||||||
[[ ! -s $TEST_LOG ]] || fail "both booted parameters avoid an unnecessary reboot prompt"
|
[[ ! -s $TEST_LOG ]] || fail "both booted parameters avoid an unnecessary reboot prompt"
|
||||||
pass "the reboot prompt remains until both parameters are booted"
|
pass "the reboot prompt remains until both parameters are booted"
|
||||||
|
|
||||||
|
rm "$display_conf"
|
||||||
|
printf '%s\n' 'root=UUID=keep quiet' >"$TEST_IMAGE_CMDLINE"
|
||||||
|
printf '%s\n' 'root=UUID=keep quiet' >"$running_cmdline"
|
||||||
|
TEST_REBUILD_STATUS=1 run_migration && fail "a failed rebuild after restoring the drop-in leaves the migration pending"
|
||||||
|
[[ -e $display_conf && ! -e $rebuild_marker ]] && ! grep -q '^state ' "$TEST_LOG" ||
|
||||||
|
fail "restoring the drop-in invalidates the old rebuild marker before a failed rebuild"
|
||||||
|
pass "restoring the drop-in invalidates the old marker before a failed rebuild"
|
||||||
|
|
||||||
|
run_migration
|
||||||
|
[[ -e $rebuild_marker && $(<"$TEST_IMAGE_CMDLINE") == "$expected_cmdline" ]] &&
|
||||||
|
grep -q '^sudo limine-mkinitcpio$' "$TEST_LOG" &&
|
||||||
|
grep -q '^state set reboot-required$' "$TEST_LOG" ||
|
||||||
|
fail "restoring a lost drop-in rebuilds even after a previous successful migration"
|
||||||
|
pass "restoring a lost drop-in rebuilds even after a previous successful migration"
|
||||||
Reference in new issue
Block a user