Fail updates that leave required Panther Lake firmware unrepaired
Honor package exclusions while returning failure when an installation leaves the required Cirrus firmware too old. Print-only and download-only operations remain successful without a repair or reboot request. Co-Authored-By: GPT-6.1-Sol High <noreply@openai.com> Co-Authored-By: Greptile <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
033b5ecd3d
commit
19e5941075
2 files changed
+27
-1
No files matched your search
@@ -10,6 +10,7 @@ query_args=()
|
||||
declare -A firmware_targets needed_options
|
||||
sync=0 upgrades=0 ask_bits=0 repair_reboot=0
|
||||
noninteractive=0
|
||||
install_operation=1
|
||||
operand="" option=""
|
||||
end_options=0
|
||||
separator_index=""
|
||||
@@ -40,6 +41,9 @@ for index in "${!pacman_args[@]}"; do
|
||||
--sysupgrade) ((upgrades += 1)) ;;
|
||||
--noconfirm) noninteractive=1 ;;
|
||||
--confirm) noninteractive=0 ;;
|
||||
--print|--downloadonly) install_operation=0 ;;
|
||||
--print-format) install_operation=0; operand=skip ;;
|
||||
--print-format=*) install_operation=0 ;;
|
||||
--ask) operand=ask ;;
|
||||
--ask=*)
|
||||
mask=${arg#*=}
|
||||
@@ -55,6 +59,7 @@ for index in "${!pacman_args[@]}"; do
|
||||
--*) ;;
|
||||
-*)
|
||||
[[ $arg != *S* ]] || sync=1
|
||||
[[ $arg != *p* && $arg != *w* ]] || install_operation=0
|
||||
upgrade_flags=${arg//[^u]/}
|
||||
((upgrades += ${#upgrade_flags}))
|
||||
;;
|
||||
@@ -111,11 +116,13 @@ fi
|
||||
|
||||
if (( repair_reboot )); then
|
||||
sudo env "${env_args[@]}" "${scope[@]}" pacman "${pacman_args[@]}" || exit $?
|
||||
(( install_operation )) || exit 0
|
||||
cirrus_package=$(pacman "${query_args[@]}" -Q linux-firmware-cirrus 2>/dev/null || true)
|
||||
if [[ -n $cirrus_package ]] && (( $(vercmp "${cirrus_package#* }" "20260810-3") >= 0 )); then
|
||||
omarchy-state set reboot-required
|
||||
else
|
||||
echo "Speaker firmware was not repaired; check the transaction's package exclusions." >&2
|
||||
echo "Speaker firmware requires linux-firmware-cirrus>=20260810-3. Check package exclusions and retry the update." >&2
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
exec sudo env "${env_args[@]}" "${scope[@]}" pacman "${pacman_args[@]}"
|
||||
|
||||
Reference in new issue
Block a user