cache-apt-pkgs-action/.github
Rob Taylor 5bddecf9cd Fix dpkg not knowing about packages after cache restore
After cache restore, dpkg had no record of the installed packages because:
1. Only preinst/postinst scripts were cached from /var/lib/dpkg/info/,
   missing .list, .md5sums, .conffiles, and other metadata files
2. The dpkg status database (/var/lib/dpkg/status) was never updated

This meant dpkg -s, apt list --installed, and anything checking package
state would not see the restored packages.

Fix:
- Cache all /var/lib/dpkg/info/<package>.* files (not just install scripts)
- Save each package's dpkg status entry to a .dpkg-status file
- On restore, append status entries to /var/lib/dpkg/status (skipping
  packages that are already registered)

Adds tests verifying dpkg -s reports packages as installed after both
fresh install and cache restore.

Co-developed-by: Claude Code v2.1.58 (claude-opus-4-6)
2026-03-10 18:30:37 +00:00
..
ISSUE_TEMPLATE Update issue templates 2022-11-23 22:13:12 -08:00
workflows Fix dpkg not knowing about packages after cache restore 2026-03-10 18:30:37 +00:00