Package: dpkg
Version: 1.19.2
Severity: wishlist

Hi,

lintian recently tagged mmdebstrap with uses-dpkg-database-directly
because mmdebstrap contains the string "/var/lib/dpkg" in several
places. Instead of overwriting the lintian tag in mmdebstrap, dpkg could
also gain an interface which avoids mmdebstrap having to do anything
with /var/lib/dpkg inside the chroot. Specifically, what mmdebstrap does
is the following:

 - create /var/lib/dpkg, /var/lib/dpkg/triggers, /var/lib/dpkg/info,
   /var/lib/dpkg/alternatives and /var/lib/dpkg/updates because dpkg
   throws an error if these directories are not present

 - an empty /var/lib/dpkg/status because dpkg refuses to work without
   the file being present

 - adds architectures to /var/lib/dpkg/arch because $(dpkg
   --add-architecture) doesn't work without any packages inside the
   chroot

 - cleans up leftover /var/lib/dpkg/lock-frontend and /var/lib/dpkg/lock

This could be avoided if:

 - dpkg would not complain anymore about non-existing directories but
   instead create them if they don't exist yet

 - dpkg would not complain about a non-existing status file but create
   an empty one if it doesn't exist yet

 - allow $(dpkg --add-architecture) to work in places other than /

 - add an interface to clean up /var/lib/dpkg

Thanks!

cheers, josch

Reply via email to