fix(installer): test-build before replacing the active installation

Adapt the preflight protection from #128 without its firmware backup or
other installer policy changes. Build a clean private copy against the
running kernel before firmware replacement or DKMS removal. Treat log
initialization failure as an error and add mocked main-flow regressions.

Co-authored-by: rtk94 <richardtknepp@gmail.com>
(cherry picked from commit bee40068b9)
This commit is contained in:
Shen Mintao committed 2026-11-02 14:32:11 +08:00
1 parent f4065a8c89
commit 20fb7181e6
3 files changed
+160 -3

No files matched your search

+8
View File
@@ -35,6 +35,14 @@ cannot download dependencies because the database is stale, run
`sudo pacman -Syu` yourself, reboot if the kernel was updated, and rerun the
installer with headers matching the running kernel.
Before replacing installed firmware or DKMS modules, the installer cleans and
test-builds a temporary copy of the driver for the running kernel. A test-build
failure leaves the existing firmware, DKMS registration and installed source
untouched. A successful installation compiles again through DKMS, so this check
adds build time. Logs are written to `/var/log/aic8800-install.log` with mode
`0644` after the root check. This check does not provide automatic rollback if a
later installation step fails.
The USB modules declare the complete firmware set shipped in `fw/`, including
configuration files and extension patches, so initramfs tools can include those
files when they include the modules. Rerun the installer after updating the