From 824be4b5241b025d2c5aa545f5456b4ea36cc52a Mon Sep 17 00:00:00 2001 From: Afonso Oliveira Date: Tue, 8 Sep 2026 00:30:32 +0100 Subject: [PATCH] Keep YT6801 fallback through hardware reruns --- .../hardware/fix-yt6801-ethernet-adapter.sh | 13 +++------ test/shell.d/yt6801-driver-test.sh | 29 +++++-------------- 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/install/hardware/fix-yt6801-ethernet-adapter.sh b/install/hardware/fix-yt6801-ethernet-adapter.sh index e048cc79..89997bec 100644 --- a/install/hardware/fix-yt6801-ethernet-adapter.sh +++ b/install/hardware/fix-yt6801-ethernet-adapter.sh @@ -1,9 +1,4 @@ -# Use the upstream driver for the Motorcomm YT6801 adapter used by the Slimbook Executive. -if ! yt6801_devices=$(lspci -Dn -d 1f0a:6801); then - echo "Unable to discover YT6801 adapters." >&2 - return 1 -fi - -if [[ -n $yt6801_devices ]]; then - omarchy-pkg-drop yt6801-dkms -fi +# Fresh installs use the kernel's upstream dwmac-motorcomm driver and do not +# install yt6801-dkms. Existing systems retire that fallback in migration +# 1788279117 only after proving the running kernel alias and every live binding; +# a manual hardware-setup rerun must not remove it ahead of that cutover. diff --git a/test/shell.d/yt6801-driver-test.sh b/test/shell.d/yt6801-driver-test.sh index db8b12c1..80393189 100644 --- a/test/shell.d/yt6801-driver-test.sh +++ b/test/shell.d/yt6801-driver-test.sh @@ -320,30 +320,15 @@ run_migration assert_no_privileges "an unaffected machine must need no privileges" pass "an unaffected machine is a successful no-op" -# Setup leaves are sourced, and must not inspect/load the live ISO kernel. +# Setup leaves are sourced. A manual rerun on an old or partially migrated +# system must leave the fallback in place for the migration's proven cutover. reset_state bash -eE -c 'source "$1"' bash "$ROOT/install/hardware/fix-yt6801-ethernet-adapter.sh" -[[ ! -e $TEST_STATE/package ]] || fail "hardware setup did not remove the vendor package" -if grep -Eq '^(modinfo|modprobe|rmmod|tee) ' "$TEST_CALLS"; then - fail "hardware setup must not manipulate the installer kernel" -fi -pass "fresh setup removes the package independently of the ISO kernel" - -for fault in pci-fail pci-partial query-fail remove-fail; do - reset_state - TEST_FAULT=$fault - if bash -eE -c 'source "$1"' bash "$ROOT/install/hardware/fix-yt6801-ethernet-adapter.sh" >"$test_tmp/output" 2>&1; then - fail "hardware setup must fail on $fault" - fi - [[ -e $TEST_STATE/package ]] || fail "failed setup unexpectedly removed the package" - pass "fresh setup propagates $fault" -done - -reset_state -: >"$TEST_STATE/devices" -bash -eE -c 'source "$1"' bash "$ROOT/install/hardware/fix-yt6801-ethernet-adapter.sh" -assert_no_privileges "setup without target hardware must need no privileges" -pass "fresh setup skips machines without target hardware" +[[ -e $TEST_STATE/package && -e $TEST_STATE/vendor-loaded ]] || + fail "manual hardware setup retired the YT6801 fallback" +[[ ! -s $TEST_CALLS ]] || + fail "manual hardware setup performed package, discovery, or module work" "$(cat "$TEST_CALLS")" +pass "manual hardware setup leaves the vendor fallback for the proven migration cutover" # Exercise the real runner's completion markers and queue, without using the # current user's state directory or running any other repository migrations.