Package: base-files Version: 13 Severity: important -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
I'm creating a script to build an image where I essentially do this: - - Create base system with debootstrap (minbase variant) - - Install aptitude - - Use aptitude to install more packages And then I noticed the following in the log file: ```sh E: Could not open lock file /var/lock/aptitude - open (2: No such file or directory) E: Could not initialize dependency cache ... W: Could not lock the cache file; this usually means that dpkg or another apt tool is already installing packages. Opening in read-only mode; any changes you make to the states of packages will NOT be preserved! ``` So I modified my script to first list the contents of `/run` and `/var`: ```sh ls -lh /run: total 0 drwxr-xr-x 4 root root 160 Oct 8 13:16 host ls -lh /var: total 36K drwxr-xr-x 2 root root 4.0K Jun 11 15:00 backups drwxr-xr-x 5 root root 4.0K Oct 8 13:11 cache drwxr-xr-x 8 root root 4.0K Oct 8 13:16 lib drwxrwsr-x 2 root staff 4.0K Jun 11 15:00 local lrwxrwxrwx 1 root root 9 Oct 8 13:12 lock -> /run/lock drwxr-xr-x 4 root root 4.0K Oct 8 13:15 log drwxrwsr-x 2 root mail 4.0K Oct 8 13:12 mail drwxr-xr-x 2 root root 4.0K Oct 8 13:12 opt lrwxrwxrwx 1 root root 4 Oct 8 13:12 run -> /run drwxr-xr-x 2 root root 4.0K Oct 8 13:12 spool drwxrwxrwt 2 root root 4.0K Jun 11 15:00 tmp ``` So `/var/lock` points to `/run/lock` ... which doesn't exist. And that results in errors and a warning from aptitude with potentially some serious consequences. - -- System Information: Debian Release: trixie/sid APT prefers unstable-debug APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (101, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 6.5.0-1-amd64 (SMP w/16 CPU threads; PREEMPT) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages base-files depends on: ii gawk [awk] 1:5.2.1-2 ii mawk [awk] 1.3.4.20230808-1 base-files recommends no packages. base-files suggests no packages. - -- no debconf information -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQT1sUPBYsyGmi4usy/XblvOeH7bbgUCZSLSxQAKCRDXblvOeH7b bjVhAQDi4c3eNjc46q5SwyUGAEOw2GYNeDCv8YaQQNzd8DJQvgEAkrLv9MZT7Poi wNMhu8033wGVsGwn4RvoVhA509y8VwA= =jW5K -----END PGP SIGNATURE-----