You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Read a Held Package as Installed in install-tools.sh's package_installed #3511
host-setup/linux/install-tools.sh's package_installed matches dpkg's whole ${Status} against install ok installed. A held package's status is hold ok installed, so it reads as missing. apt_missing builds on it, so a held package is planned for install again, and line 766's present check skips a held package it should count.
Reproduce
In a throwaway debian:13 container, apt-get install -y less && apt-mark hold less, then dpkg-query -W -f='${Status} | ${db:Status-Status}\n' less prints hold ok installed | installed.
Fix
Compare ${db:Status-Status} to installed, which reads a held package as installed. ptr727/HomeAutomation-Config#1093 made the same fix in that repository's install-lib.shpackage_installed, and the hub copy can take the same one-line body.
Found by the local strict review of ptr727/HomeAutomation-Config#1093.
A caveat on the one-line fix, read after filing: line 766 feeds the Docker conflict removal, run_root apt-get remove -y "${present[@]}". Today a held conflicting package is skipped there and stays installed. With the fix it joins present, and apt-get remove -y then refuses with exit 100 (Held packages were changed and -y was used without --allow-change-held-packages), measured with apt-get purge -y on a held package in debian:13. A dry run with -s passes, so it doesn't catch this. ptr727/HomeAutomation-Config#1093 handles the same case in USBDev/usb-dev-setup.sh by reading ${db:Status-Want} for hold and reporting a held conflict for manual action before removing anything.
A second hub copy of the same check already reads a hold correctly: host-setup/linux/setup-github.sh:126 matches ^(install|hold) ok installed. So the hub holds two package_installed definitions that disagree on a held package. Per "Design Before Code", the fix is one shared definition, taken by both scripts, rather than a second per-site patch.
Activity
ptr727 commentedon Oct 26, 2026
A caveat on the one-line fix, read after filing: line 766 feeds the Docker conflict removal,
run_root apt-get remove -y "${present[@]}". Today a held conflicting package is skipped there and stays installed. With the fix it joinspresent, andapt-get remove -ythen refuses with exit 100 (Held packages were changed and -y was used without --allow-change-held-packages), measured withapt-get purge -yon a held package indebian:13. A dry run with-spasses, so it doesn't catch this. ptr727/HomeAutomation-Config#1093 handles the same case inUSBDev/usb-dev-setup.shby reading${db:Status-Want}forholdand reporting a held conflict for manual action before removing anything.ptr727 commentedon Oct 26, 2026
A second hub copy of the same check already reads a hold correctly:
host-setup/linux/setup-github.sh:126matches^(install|hold) ok installed. So the hub holds twopackage_installeddefinitions that disagree on a held package. Per "Design Before Code", the fix is one shared definition, taken by both scripts, rather than a second per-site patch.Read a Held Package as Installed in Both Linux Host Scripts (#3650)