fleet/changes/20751-detect-held-linux-packages-as-installed
Georg Schölly a41fb636bc
Detect software from deb_packages which is 'on hold' (#20751)
The list of installed software was missing packages put ['on
hold'](https://askubuntu.com/questions/18654/how-to-prevent-updating-of-a-specific-package)

The reason for this is that the old query looks for the status

    install ok installed

but there are other valid status which are also installed, like `hold ok
installed`. The syntax is `<desired> <error> <status>` so we only need
to look at the last or two last parts and ignore the first one.

See https://man7.org/linux/man-pages/man1/dpkg-query.1.html for a list
of status.

# Checklist for submitter

- [X] Changes file added for user-visible changes in `changes/`,
`orbit/changes/` or `ee/fleetd-chrome/changes`.
See [Changes
files](https://fleetdm.com/docs/contributing/committing-changes#changes-files)
for more information.
- [X] Input data is properly validated, `SELECT *` is avoided, SQL
injection is prevented (using placeholders for values in statements)
2024-08-01 11:39:01 -03:00

1 line
80 B
Text

Linux .deb packages 'on hold' are now included in the installed software list.