GRMLBASE/01-packages: also detect and report unknown package names
authorMichael Prokop <mika@grml.org>
Wed, 10 Mar 2021 13:59:50 +0000 (14:59 +0100)
committerMichael Prokop <mika@grml.org>
Wed, 10 Mar 2021 16:20:42 +0000 (17:20 +0100)
commit4e93b8eddcee4f8e2a8d4b3bed24ed794a936c0e
treeea13fd9ba4beb6677b80d22d0e57313ed5a85130
parent8c0c9d9228f2ac667279c6384edf08af401ffe00
GRMLBASE/01-packages: also detect and report unknown package names

If FAI doesn't know package names during its dirinstall run, it reports:

| WARNING: These unknown packages are removed from the installation list

... in fai.log and software.log. This happens e.g. if a package was
removed from a Debian repository and is no longer known therefore. What
FAI reports through its install_packages.list are only packages that
were asked for installation *and* exist as such (so not a "unknown
package package"), but failed to install - so this sadly doesn't help
us.

One option would be to set FAI_DISABLE_PACKAGE_NAME_CHECK=1 (which
corresponds to FAI install_packages's -N cmdline option), but then the
installation fails hard with unknown packages, which isn't what we want
as default behavior. But provide this disabled(!) configuration option
in GRMLBASE.var, just in case someone is looking for it.

As a solution for our use case, let's handle this via our existing
GRMLBASE/01-packages script, which checks for missing packages already.
Now we also check FAI's software.log for the 'These unknown packages'
error message and report them via package_errors.log.

This work was funded by Grml-Forensic.
etc/grml/fai/config/class/GRMLBASE.var
etc/grml/fai/config/scripts/GRMLBASE/01-packages