From 2d2cdfbbc35e06987d8f34c0bde7a05249f5dd4c Mon Sep 17 00:00:00 2001 From: Johannes 'josch' Schauer Date: Wed, 21 Aug 2019 14:57:54 +0200 Subject: [PATCH] create /var/lib/dpkg/cmethopt for dselect (see #930788) --- coverage.sh | 5 +++-- mmdebstrap | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/coverage.sh b/coverage.sh index 41fbb19..c2785b5 100755 --- a/coverage.sh +++ b/coverage.sh @@ -134,8 +134,7 @@ rm /tmp/debian-$dist-debootstrap/var/cache/debconf/templates.dat-old \ rm /tmp/debian-$dist-debootstrap/var/lib/dpkg/status-old \ /tmp/debian-$dist-mm/var/lib/dpkg/status-old # remove dpkg files -rm /tmp/debian-$dist-debootstrap/var/lib/dpkg/available \ - /tmp/debian-$dist-debootstrap/var/lib/dpkg/cmethopt +rm /tmp/debian-$dist-debootstrap/var/lib/dpkg/available touch /tmp/debian-$dist-debootstrap/var/lib/dpkg/available # since we installed packages directly from the .deb files, Priorities differ # thus we first check for equality and then remove the files @@ -1061,6 +1060,7 @@ rm /tmp/debian-chroot/var/lib/dpkg/available rm /tmp/debian-chroot/var/cache/apt/archives/lock rm /tmp/debian-chroot/var/lib/dpkg/lock rm /tmp/debian-chroot/var/lib/dpkg/lock-frontend +rm /tmp/debian-chroot/var/lib/dpkg/cmethopt rm /tmp/debian-chroot/var/lib/apt/lists/lock ## delete merged usr symlinks #rm /tmp/debian-chroot/libx32 @@ -1117,6 +1117,7 @@ rm /tmp/debian-chroot/var/lib/dpkg/available rm /tmp/debian-chroot/var/cache/apt/archives/lock rm /tmp/debian-chroot/var/lib/dpkg/lock rm /tmp/debian-chroot/var/lib/dpkg/lock-frontend +rm /tmp/debian-chroot/var/lib/dpkg/cmethopt rm /tmp/debian-chroot/var/lib/apt/lists/lock rm /tmp/debian-chroot/var/lib/apt/extended_states ## delete merged usr symlinks diff --git a/mmdebstrap b/mmdebstrap index 6822859..fcfbb75 100755 --- a/mmdebstrap +++ b/mmdebstrap @@ -1015,6 +1015,14 @@ sub setup { close $fh; } + # /var/lib/dpkg/cmethopt is used by dselect + # see #930788 + { + open my $fh, '>', "$options->{root}/var/lib/dpkg/cmethopt" or error "failed to open(): $!"; + print $fh "apt apt\n"; + close $fh; + } + if (scalar @{$options->{foreignarchs}} > 0) { open my $fh, '>', "$options->{root}/var/lib/dpkg/arch" or error "cannot open /var/lib/dpkg/arch: $!"; print $fh "$options->{nativearch}\n";