[Git-commits] [grml/grml-live] ef74e8: Rebuild /var/lib/dpkg/available to install not-yet...

Michael Prokop noreply at github.com
Tue Sep 10 11:51:25 CEST 2019


  Branch: refs/heads/master
  Home:   https://github.com/grml/grml-live
  Commit: ef74e870ca6a2b6f307d6390d7fb9f6964299551
      https://github.com/grml/grml-live/commit/ef74e870ca6a2b6f307d6390d7fb9f6964299551
  Author: Michael Prokop <mika at grml.org>
  Date:   2019-09-10 (Tue, 10 Sep 2019)

  Changed paths:
    M etc/grml/fai/config/hooks/instsoft.GRMLBASE

  Log Message:
  -----------
  Rebuild /var/lib/dpkg/available to install not-yet-installed packages in update runs

When executing grml-live in update mode (grml-live [...] -u) using an
existing grml_chroot, then script GRMLBASE/98-clean-chroot has emptied
/var/lib/dpkg/available in a previous run already.

Executing `apt-get update` does NOT re-generate the file. This leads to
FAI's install_packages with its mkpackagelist() and clean_pkg_list()
failing to install requested packages, but reporting all packages with:

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

This is unexpected, as an update run shouldn't just update existing
packages, but also try to install any additionally requested packages
from the software selection (as a package might not have been installed
due to missing dependencies, that have been taken care of in the
meanwhile).

So if we'd detect an existing /var/lib/dpkg/available that is empty,
then we would have to rebuild it using /usr/lib/dpkg/methods/apt/update.
Since /usr/lib/dpkg/methods/apt/update essentially also executes
'apt-get update' underneath, there's no need to run 'apt-get update'
only with empty /var/lib/dpkg/available, instead let's always rely on
/usr/lib/dpkg/methods/apt/update.




More information about the Git-commits mailing list