Package: mmdebstrap
Version: 1.5.7-1+deb13u1
Severity: minor
File: /usr/bin/mmdebstrap
Description package fields live in e.g.
/var/lib/apt/lists/deb.debian.org_debian_dists_trixie_main_i18n_Translation-en
not
/var/lib/apt/lists/deb.debian.org_debian_dists_trixie_main_binary-amd64_Packages
For speed, mmdebstrap skips Translation files by default.
If you do e.g. "apt show mg" inside mmdebstrap,
the Description is only the first line.
I have a rare case where I actually want the Translation-en downloaded:
17:41 <twb> TIR there is no way to say "is this a transition package" other
than grepping for "safely remove" in Description
trying to follow the examples in the manpage is not working for me.
A minimal example is this:
mmdebstrap stable /dev/null --aptopt='Acquire::Languages { "en"; }'
--{essential,customize}-hook='find $1/var/lib/apt/lists -name "*Translation*"
-ls -quit'
[no results]
You can also try variations to look at apt's parsed config, e.g.
mmdebstrap stable /dev/null --aptopt='Acquire::Languages { "en"; }'
--{essential,customize}-hook='APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt-config dump
| grep Languages' --customize-hook='chroot $1 apt-config dump | grep Languages'
Acquire::Languages "";
Acquire::Languages:: "none";
Acquire::Languages "";
Acquire::Languages:: "none";
Acquire::Languages "";
Acquire::Languages:: "none";
I do not know if apt is trying to interact with LANGUAGE/LANG/LC_ALL
(mmdebstrap sets them all to C.UTF-8 by default).
I tried tweaking those variables but it didn't help.
I do not know if apt is trying to interact with locales/locales-all/localepurge
packages inside the build root.
Since those packages would only get installed after --essential-hook, I don't
think that can possibly be relevant here.
Here are some additional diagnostics about my host system in case that helps
somehow.
bash5$ locale -a
C
C.utf8
POSIX
en_AU.utf8
bash5$ locale
LANG=en_AU.UTF-8
LANGUAGE=
LC_CTYPE="en_AU.UTF-8"
LC_NUMERIC="en_AU.UTF-8"
LC_TIME="en_AU.UTF-8"
LC_COLLATE=C
LC_MONETARY="en_AU.UTF-8"
LC_MESSAGES="en_AU.UTF-8"
LC_PAPER="en_AU.UTF-8"
LC_NAME="en_AU.UTF-8"
LC_ADDRESS="en_AU.UTF-8"
LC_TELEPHONE="en_AU.UTF-8"
LC_MEASUREMENT="en_AU.UTF-8"
LC_IDENTIFICATION="en_AU.UTF-8"
LC_ALL=
bash5$ apt-config dump Acquire | grep Language
Acquire::Languages "";
Acquire::Languages:: "en_AU";
Acquire::Languages:: "en";
Acquire::Languages:: "none";
bash5$ mmdebstrap stable /dev/null --quiet --essential-hook='apt-config
dump Acquire | grep Language' # no chroot nor APT_CONFIG -- looking at host's
apt config
Acquire::Languages "";
Acquire::Languages:: "en";
Acquire::Languages:: "none";
bash5$ mmdebstrap stable /dev/null --quiet --essential-hook='env -u LC_ALL
-u LANGUAGE LANG=en_AU.UTF-8 apt-config dump Acquire | grep Language' # no
chroot nor APT_CONFIG -- looking at host's apt config
Acquire::Languages "";
Acquire::Languages:: "en_AU";
Acquire::Languages:: "en";
Acquire::Languages:: "none";
What if I try using the host's Acquire::Language lines *exactly* as written?
OK that works!
bash5$ mmdebstrap stable /dev/null --aptopt="$(apt-config dump Acquire |
grep Language)" --{essential,customize}-hook='find $1/var/lib/apt/lists -name
"*Translation*" -ls -quit'
--{essential,customize}-hook='APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt-config dump
Acquire | grep Language' --customize-hook='chroot $1 apt-config dump Acquire |
grep Language'
I: automatically chosen mode: unshare
I: chroot architecture amd64 is equal to the host's architecture
I: finding correct signed-by value...
done
I: automatically chosen format: null
I: using /tmp/mmdebstrap.2YRgQIDgiw as tempdir
I: running apt-get update...
done
I: downloading packages with apt...
done
I: extracting archives...
done
I: installing essential packages...
done
I: running --essential-hook in shell: sh -c 'find $1/var/lib/apt/lists
-name "*Translation*" -ls -quit' exec /tmp/mmdebstrap.2YRgQIDgiw
5062882 472 -rw-r--r-- 1 root root 479718 Mar 13 08:00
/tmp/mmdebstrap.2YRgQIDgiw/var/lib/apt/lists/security.debian.org_debian-security_dists_stable-security_main_i18n_Translation-en
I: running --essential-hook in shell: sh -c
'APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt-config dump Acquire | grep Language'
exec /tmp/mmdebstrap.2YRgQIDgiw
Acquire::Languages "";
Acquire::Languages:: "en_AU";
Acquire::Languages:: "en";
Acquire::Languages:: "none";
I: installing remaining packages inside the chroot...
done
done
I: running --customize-hook in shell: sh -c 'find $1/var/lib/apt/lists
-name "*Translation*" -ls -quit' exec /tmp/mmdebstrap.2YRgQIDgiw
5062882 472 -rw-r--r-- 1 root root 479718 Mar 13 08:00
/tmp/mmdebstrap.2YRgQIDgiw/var/lib/apt/lists/security.debian.org_debian-security_dists_stable-security_main_i18n_Translation-en
I: running --customize-hook in shell: sh -c
'APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt-config dump Acquire | grep Language'
exec /tmp/mmdebstrap.2YRgQIDgiw
Acquire::Languages "";
Acquire::Languages:: "en_AU";
Acquire::Languages:: "en";
Acquire::Languages:: "none";
I: running --customize-hook in shell: sh -c 'chroot $1 apt-config dump
Acquire | grep Language' exec /tmp/mmdebstrap.2YRgQIDgiw
Acquire::Languages "";
Acquire::Languages:: "en_AU";
Acquire::Languages:: "en";
Acquire::Languages:: "none";
I: cleaning package lists and apt cache...
done
done
I: removing tempdir /tmp/mmdebstrap.2YRgQIDgiw...
I: success in 32.2214 seconds
Let me now go back and re-try *exactly* what the manpage told me to do...
It's not clear to me if the manpage example was "here are two different
examples" or "here is one example, you need BOTH lines".
But let's try both interpretations. Neither work.
bash5$ mmdebstrap stable /dev/null --quiet --aptopt='Acquire::Languages {
"environment"; "en"; }' --essential-hook='find $1/var/lib/apt/lists -name
"*Translation*" -ls -quit'
[no hits]
bash5$ mmdebstrap stable /dev/null --quiet --aptopt='Acquire::Languages {
"environment"; "en"; }' --aptopt='Acquire::Languages "none"'
--essential-hook='find $1/var/lib/apt/lists -name "*Translation*" -ls -quit'
[no hits]
So whatever is going on here, the manpage needs to be changed.
Maybe this is like systemd, where you have to "zero out" the variable before
you add your new entries to it?
Otherwise the value set by mmdebstrap already (none) causes apt to stop looking
for subsequent values?
bash5$ mmdebstrap stable /dev/null --quiet --aptopt='Acquire::Languages "";
Acquire::Languages "en";' --essential-hook='find $1/var/lib/apt/lists -name
"*Translation*" -ls -quit'
5103899 472 -rw-r--r-- 1 root root 479718 Mar 13 08:00
/tmp/mmdebstrap.ML02zxB87c/var/lib/apt/lists/security.debian.org_debian-security_dists_stable-security_main_i18n_Translation-en
bash5$ mmdebstrap stable /dev/null --quiet --aptopt='Acquire::Languages "";
Acquire::Languages:: "en";' --essential-hook='find $1/var/lib/apt/lists -name
"*Translation*" -ls -quit'
5117578 472 -rw-r--r-- 1 root root 479718 Mar 13 08:00
/tmp/mmdebstrap.CFVLKA_z9N/var/lib/apt/lists/security.debian.org_debian-security_dists_stable-security_main_i18n_Translation-en
bash5$ mmdebstrap stable /dev/null --quiet --aptopt='Acquire::Languages::
"en";' --essential-hook='find $1/var/lib/apt/lists -name "*Translation*" -ls
-quit'
[no hits]
-- System Information:
Debian Release: 13.4
APT prefers stable-updates
APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500,
'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.73+deb13-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE,
TAINT_UNSIGNED_MODULE
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages mmdebstrap depends on:
ii apt 3.0.3
ii perl 5.40.1-6
ii python3 3.13.5-1
Versions of packages mmdebstrap recommends:
ii arch-test 0.22-1
ii gpg 2.4.7-21+deb13u1+b2
ii libdistro-info-perl 1.13
ii libdpkg-perl 1.22.22
ii mount 2.41-5
ii uidmap 1:4.17.4-2
Versions of packages mmdebstrap suggests:
pn apt-transport-tor <none>
ii apt-utils 3.0.3
ii binfmt-support 2.2.2-7
ii bzip2 1.0.8-6
ii ca-certificates 20250419
pn debootstrap <none>
ii distro-info-data 0.66+deb13u1
ii dpkg-dev 1.22.22
ii e2fsprogs 1.47.2-3+b10
ii fakechroot 2.20.1+ds-18
ii fakeroot 1.37.1.1-1
ii genext2fs 1.5.0-3+b1
ii libarchive13t64 [libarchive13] 3.7.4-4
ii lz4 1.10.0-4
ii lzop 1.04-2
pn ncompress <none>
ii perl-doc 5.40.1-6
ii qemu-user 1:10.0.8+ds-0+deb13u1+b1
ii qemu-user-static 1:10.0.8+ds-0+deb13u1+b1
ii squashfs-tools-ng 1.3.2-1
ii systemd 257.9-1~deb13u1
ii xz-utils 5.8.1-1
ii zstd 1.5.7+dfsg-1
-- no debconf information