Would like to clarify this bug report. mmdebstrap currently creates a chroot which is incompatible with aptitude. [Creating follow-up issues with cowbuilder / pbuilder.]
Actually the workaround "/usr/lib/dpkg/methods/apt/update /var/lib/dpkg apt apt" generates /var/lib/dpkg/available but is insufficient to make aptitude work. # How to reproduce: sudo mmdebstrap --mode=root --aptopt=/home/user/whonix_binary/aptgetopt.conf stretch /var/cache/pbuilder/base.cow /home/user/whonix_dot/Whonix/build_sources/debian_stable_current_clearnet.list sudo chroot /var/cache/pbuilder/base.cow apt update aptitude install gawk # Expected result: Installs the package. # Actual result: Warning: Invalid locale (please review locale settings, this might lead to problems later): locale::facet::_S_create_c_locale name not valid [ ERR] Writing extended state information [ ERR] Building tag database E: Failed to execute process to save dpkg selections, dpkg or trying to execute it exited with status/errno: 2 E: failed to save selections to dpkg database # Misc: dpkg seems to work fine. dpkg --set-selections < a ; echo $? 0 dpkg --get-selections > a ; echo $? 0 dpkg --audit ; echo $? 0 Kind regards, Patrick

