Thread View: linux.debian.bugs.dist
3 messages
3 total messages
Started by Johannes Schauer Marin Rodrigues
Wed, 07 Oct 2026 08:20
Bug#1135708: Should $MMDEBSTRAP_APT_CONFIG deal with Dir::Aptitude::State?
Author: Johannes Schauer Marin Rodrigues
Date: Wed, 07 Oct 2026 08:20
Date: Wed, 07 Oct 2026 08:20
72 lines
4651 bytes
4651 bytes
--===============1125942577832086571== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, Quoting Trent W. Buck (2026-05-05 04:00:02) > When debugging an mmdebstrap build, I occasionally want an interactive ap= titude GUI. > Using $MMDEBSTRAP_APT_CONFIG, I can do this without bothering to install = aptitude inside the built environment. >=20 > This works with minor issues: >=20 > mmdebstrap forky /dev/null --customize-hook=3D'APT_CONFIG=3D$MMDEBSTR= AP_APT_CONFIG aptitude' >=20 > This works with no issues: >=20 > mmdebstrap forky /dev/null --customize-hook=3D'APT_CONFIG=3D$MMDEBSTR= AP_APT_CONFIG HOME=3D$1/root aptitude -oDir::Aptitude::State=3Dvar/lib/apti= tude' --essential-hook=3D'mkdir -p $1/var/lib/aptitude' >=20 > or >=20 > mmdebstrap forky /dev/null --customize-hook=3D'APT_CONFIG=3D$MMDEBSTR= AP_APT_CONFIG HOME=3D$1/root aptitude -oDir::Aptitude::State=3Dvar/lib/apti= tude' --include=3Daptitude >=20 > Should mmdebstrap set Dir::Aptitude::State "var/lib/aptitude" in MMDEBSTR= AP_APT_CONFIG? did you consider running aptitude inside a --chrooted-customize-hook? THen = you don't need neither APT_CONFIG nor Dir::Aptitude::State. The way you are run= ning mmdebstrap above means that you install aptitude inside the chroot but then= you are running aptitude from *outside* the chroot. If you have aptitude inside= the chroot anyways, why not run that one? It would also be a bit shorter: mmdebstrap forky /dev/null --chrooted-customize-hook=3Daptitude Thanks! cheers, josch --===============1125942577832086571== MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Description: signature Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmrF/l8ACgkQ8sulx4+9 g+EUNxAAlr5Nn2jWv5Y9dcocaGRXusRRBYfg9aCiNglyZ6uVzRLILn9bCgDITIq/ 6cLjA9hwYwgBO6HakWO+ozeeboEmuI4coJrqLrEXJJ03HT91hO6dmkfeF0SADvFn c5KPqjlkA+vULYfyyK72aEECrzL9aem52oFSlMmyaSzbMeKp0ddu5pjpUES1Eush K/+0YLCRPSwGpsNjlj+zoIRPVBlv42atNH+cQAZDTHAOnFoPqd9yeMYv9tpwpVqa QOFHBwaoXEpEA+1a4b9Ml/0LFNZuyiSuuxxgfVZfQEd4ME29CkMrD8ifwEhu7btB VDXPOVCe9T6TWNcyancbDJGSpNBB+v+tm4JgKQUog3IR+R0OTFJ7qBU/oQgPZrL6 hsswQjbTJTc6hCxqzZyyXdfWfheCKr1GIvvcFzALWRjpzS2VUeK+C6FpaaLGzr8c zpCA2YzpT/8wadLxmPiTu/JTAm4gCu+ZRZUDIcp/6kVd0aI6rDiSFFWd8WKfIKwu y6+szRNZr2thVks0NG6WUfIAiEzd71DyRcwZLNEyZuCLd78dDE2YMCWK/QAqup9v vscx0BloqO64x4UQHz1fc3NqE+CP8DlAA3Y2THwjJaKDHaKxHuaBF9Aq0fFm3A6H z0Lee+6EEtzTIzS2UaRJsV8I1KAr6WVsX1KNknifgI7isBc5mn4= =XalB -----END PGP SIGNATURE----- --===============1125942577832086571==--
Bug#1135708: Should $MMDEBSTRAP_APT_CONFIG deal with Dir::Aptitude::State?
Author: Johannes Schauer Marin Rodrigues
Date: Sun, 11 Oct 2026 22:30
Date: Sun, 11 Oct 2026 22:30
55 lines
4311 bytes
4311 bytes
--===============4325605340530797812== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi, Quoting Trent W. Buck (2026-10-12 00:14:59) > On 7/10/26 19:10, Johannes Schauer Marin Rodrigues wrote: > > [...] > > The way you are running > > mmdebstrap above means that you install aptitude inside the chroot but = then you > > are running aptitude from*outside* the chroot. If you have aptitude ins= ide the > > chroot anyways, why not run that one? It would also be a bit shorter: > > > > mmdebstrap forky /dev/null --chrooted-customize-hook=3Daptitude >=20 > I was only doing --include=3Daptitude in the last example. > In the other examples, I'm not installing aptitude in the chroot. >=20 > My goal is to browse around a different release than my host system, as > quickly as possible (i.e. installing as little as possible). you know that chdist exists? And chdist even has support for "chdist aptitu= de". Thanks! cheers, josch --===============4325605340530797812== MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Description: signature Content-Type: application/pgp-signature; name="signature.asc"; charset="us-ascii" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEElFhU6KL81LF4wVq58sulx4+9g+EFAmrMC5MACgkQ8sulx4+9 g+GbQQ//YHSddPlAHuGXJFUZSrmO2wiVT6f3T7JFBKTeF4zLRxR7iXGFPPHE6kt7 vujM3YBRdSAwpojxpTg6XwgBQuYcFOBh+SqSfW/EUXP/HJgDxGbwitEkv/e8rIwP rN3pP1CspkeIY9aau2bQF1lFJqVTAQk+eMs85W4l0b69b+dO1vmyHtk5uU4yYoJS amkwMSPnZT2yDv4ahT1Vvt+uLVzTyi8v651Ed64eq5Jlc+Lo0gk9tQQ5Qu9W3sN7 0pjFnIQOAnIy8wBZ6egT9kapOgl3sWW8XWYE02U2j676XywGXmPc3AAJ0aGmOnEf hfLKiXRjjxaVcKA5La+FA5YheP8oTpTEbYAUNu++nvPoYa4cyd+EzBx7BiT8odLt I3kvhsP4ERXH07i+V3CDathBBu1hSfpVSdL4gqMKp2ZpcrViuBJSicLfOaN/KqBy 3JgT2PnzYIlchirx4GXABpeOUD2lG4BYFwvAScnQQOC8XxqG9jK9MddnQdUhZ5WN Xeh83sHovnUGLkrEen422qeHt+ZsW7+iB0yoLYbXC6LPOQLZ437YYurNXN4mW2gG QNSikbtr6/L0bKxilqgLvzPaajXlAmf0XHtozIv9dSEp8dwzAYMvcdGYyx1MY4MP HYByyzTxjN+RW5q7ipCBBnFGLQV2w0jIttWl2vez0JP+n/9NHr8= =bzu1 -----END PGP SIGNATURE----- --===============4325605340530797812==--
Bug#1135708: Should $MMDEBSTRAP_APT_CONFIG deal with Dir::Aptitude::State?
Author: Trent W. Buck
Date: Sun, 11 Oct 2026 23:10
Date: Sun, 11 Oct 2026 23:10
222 lines
13703 bytes
13703 bytes
This is a multi-part message in MIME format.
--------------0iJmdfyyo4ZjEZhGD0WOtTZV
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
On 7/10/26 19:10, Johannes Schauer Marin Rodrigues wrote:
> [...]
> The way you are running
> mmdebstrap above means that you install aptitude inside the chroot but then you
> are running aptitude from*outside* the chroot. If you have aptitude inside the
> chroot anyways, why not run that one? It would also be a bit shorter:
>
> mmdebstrap forky /dev/null --chrooted-customize-hook=aptitude
I was only doing --include=aptitude in the last example.
In the other examples, I'm not installing aptitude in the chroot.
My goal is to browse around a different release than my host system,
as quickly as possible (i.e. installing as little as possible).
[Update: I was doing --variant=apt --essential-hook, but while writing
this I realized --variant=extract --extract-hook is even faster.]
This is what I'm currently doing (in my ~/.shrc):
D_aptitude () {
mmdebstrap "$@" /dev/null http://localhost:3142/debian \
--dpkgopt=force-unsafe-io \
--variant=extract \
--components=main,contrib,non-free,non-free-firmware \
'--aptopt=Acquire::Languages "en"' \
--extract-hook='APT_CONFIG=$MMDEBSTRAP_APT_CONFIG HOME=$1/root
aptitude -s -oDir::Aptitude::State=var/lib/aptitude
-oaptitude::UI::Package-Display-Format="%c%a%M%S %p %e %Z %t %v %V";
false';
}
D_aptitude forky
Compared to --include=aptitude --chrooted-customize-hook,
--essential-hook is ~30% faster, and --variant=extract --extract-hook is
~80% faster:
bash5$ time mmdebstrap forky /dev/null http://localhost:3142/debian
--dpkgopt=force-unsafe-io *--variant=extract* '--components=main,cont\
rib,non-free,non-free-firmware' '--aptopt=Acquire::Languages "en"'
*--extract-hook=*'APT_CONFIG=$MMDEBSTRAP_APT_CONFIG HOME=$1/root aptit\
ude -s -oDir::Aptitude::State=var/lib/aptitude
-oaptitude::UI::Package-Display-Format="%c%a%M%S %p %e %Z %t %v %V";
false'
aptitude cannot run in ncurses mode with terminal type "dumb"
real 0m5.536s
user 0m4.557s
sys 0m1.052s
bash5$ time mmdebstrap forky /dev/null http://localhost:3142/debian
--dpkgopt=force-unsafe-io *--variant=apt* '--components=main,contrib,\
non-free,non-free-firmware' '--aptopt=Acquire::Languages "en"'
*--essential-hook=*'APT_CONFIG=$MMDEBSTRAP_APT_CONFIG HOME=$1/root
aptitud\
e -s -oDir::Aptitude::State=var/lib/aptitude
-oaptitude::UI::Package-Display-Format="%c%a%M%S %p %e %Z %t %v %V";
false'
aptitude cannot run in ncurses mode with terminal type "dumb"
real 0m18.913s
user 0m16.201s
sys 0m5.051s
bash5$ time mmdebstrap forky /dev/null http://localhost:3142/debian
--dpkgopt=force-unsafe-io *--variant=apt* '--components=main,contrib,\
non-free,non-free-firmware' '--aptopt=Acquire::Languages "en"'
*--chrooted-customize-hook=*'aptitude -s
-oaptitude::UI::Package-Display-F\
ormat="%c%a%M%S %p %e %Z %t %v %V"; false' *--include=aptitude*
aptitude cannot run in ncurses mode with terminal type "dumb"
real 0m27.016s
user 0m19.160s
sys 0m5.958s
I guess the actual issue here is that Dir::Aptitude::State is not
relative to Dir::State by default.
I can see a case for either way.
When mmdebstrap runs host's aptitude in an unshared hook,
a Dir::Aptitude::State outside the build root (aptitude's default) will
always fail...
hrm, although I guess that is not true for --mode=root.
This has more edge cases than I thought.
I guess if no one else is asking for this, it can go on living in my
~/.shrc instead of in /bin/mmdebstrap.
PS: similar command but for apt-file not aptitude (~40% faster than
--variant=apt --include=apt-file --chrooted-customize-hook, which would
still need the --aptopt to make apt download the Contents.xz files):
mmdebstrap forky /dev/null http://localhost:3142/debian --quiet
--components=main,contrib,non-free,non-free-firmware
--aptopt=/etc/apt/apt.conf.d/50apt-file.conf --variant=custom
--extract-hook='APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt-file search
bdic | grep -een.AU -een.US -een.GB'
--------------0iJmdfyyo4ZjEZhGD0WOtTZV
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<div class="moz-cite-prefix">On 7/10/26 19:10, Johannes Schauer
Marin Rodrigues wrote:<br>
</div>
<blockquote type="cite"
cite="mid:179136061060.21057.7508895816310474707@localhost">
<pre class="moz-quote-pre" wrap="">[...]
The way you are running
mmdebstrap above means that you install aptitude inside the chroot but then you
are running aptitude from <b class="moz-txt-star"><span
class="moz-txt-tag">*</span>outside<span class="moz-txt-tag">*</span></b> the chroot. If you have aptitude inside the
chroot anyways, why not run that one? It would also be a bit shorter:
mmdebstrap forky /dev/null --chrooted-customize-hook=aptitude</pre>
</blockquote>
<p>I was only doing --include=aptitude in the last example.<br>
In the other examples, I'm not installing aptitude in the chroot.<br>
</p>
<p>My goal is to browse around a different release than my host
system,<br>
as quickly as possible (i.e. installing as little as possible).</p>
<p>[Update: I was doing --variant=apt --essential-hook, but while
writing this I realized --variant=extract --extract-hook is even
faster.]</p>
<p>This is what I'm currently doing (in my ~/.shrc):</p>
<blockquote>
<p><tt>D_aptitude () {<br>
mmdebstrap "$@" /dev/null <a class="moz-txt-link-freetext" href="http://localhost:3142/debian">http://localhost:3142/debian</a> \<br>
--dpkgopt=force-unsafe-io \<br>
--variant=extract \<br>
--components=main,contrib,non-free,non-free-firmware \<br>
'--aptopt=Acquire::Languages "en"' \<br>
--extract-hook='APT_CONFIG=$MMDEBSTRAP_APT_CONFIG
HOME=$1/root aptitude -s
-oDir::Aptitude::State=var/lib/aptitude
-oaptitude::UI::Package-Display-Format="%c%a%M%S %p %e %Z %t
%v %V"; false';<br>
}<br>
</tt><br>
<tt>D_aptitude forky</tt></p>
</blockquote>
<p>Compared to --include=aptitude --chrooted-customize-hook,
--essential-hook is ~30% faster, and --variant=extract
--extract-hook is ~80% faster:</p>
<blockquote>
<p><tt>bash5$ time mmdebstrap forky /dev/null
<a class="moz-txt-link-freetext" href="http://localhost:3142/debian">http://localhost:3142/debian</a> --dpkgopt=force-unsafe-io <b>--variant=extract</b> '--components=main,cont\<br>
rib,non-free,non-free-firmware' '--aptopt=Acquire::Languages
"en"' <b>--extract-hook=</b>'APT_CONFIG=$MMDEBSTRAP_APT_CONFIG
HOME=$1/root aptit\<br>
ude -s -oDir::Aptitude::State=var/lib/aptitude
-oaptitude::UI::Package-Display-Format="%c%a%M%S %p %e %Z %t
%v %V"; false'<br>
aptitude cannot run in ncurses mode with terminal type "dumb"<br>
real 0m5.536s<br>
user 0m4.557s<br>
sys 0m1.052s<br>
</tt><tt><br>
bash5$ time mmdebstrap forky /dev/null
<a class="moz-txt-link-freetext" href="http://localhost:3142/debian">http://localhost:3142/debian</a> --dpkgopt=force-unsafe-io <b>--variant=apt</b>
'--components=main,contrib,\</tt><br>
<tt>non-free,non-free-firmware' '--aptopt=Acquire::Languages
"en"' <b>--essential-hook=</b>'APT_CONFIG=$MMDEBSTRAP_APT_CONFIG
HOME=$1/root aptitud\</tt><br>
<tt>e -s -oDir::Aptitude::State=var/lib/aptitude
-oaptitude::UI::Package-Display-Format="%c%a%M%S %p %e %Z %t
%v %V"; false'</tt><br>
<tt>aptitude cannot run in ncurses mode with terminal type
"dumb"</tt><br>
<tt>real 0m18.913s</tt><br>
<tt>user 0m16.201s</tt><br>
<tt>sys 0m5.051s</tt><br>
<br>
<tt>bash5$ time mmdebstrap forky /dev/null
<a class="moz-txt-link-freetext" href="http://localhost:3142/debian">http://localhost:3142/debian</a> --dpkgopt=force-unsafe-io <b>--variant=apt</b>
'--components=main,contrib,\</tt><br>
<tt>non-free,non-free-firmware' '--aptopt=Acquire::Languages
"en"' <b>--chrooted-customize-hook=</b>'aptitude -s
-oaptitude::UI::Package-Display-F\</tt><br>
<tt>ormat="%c%a%M%S %p %e %Z %t %v %V"; false' <b>--include=aptitude</b></tt><br>
<tt>aptitude cannot run in ncurses mode with terminal type
"dumb"</tt><br>
<tt>real 0m27.016s</tt><br>
<tt>user 0m19.160s</tt><br>
<tt>sys 0m5.958s</tt></p>
</blockquote>
<p>I guess the actual issue here is that Dir::Aptitude::State is not
relative to Dir::State by default.<br>
I can see a case for either way.</p>
<p>When mmdebstrap runs host's aptitude in an unshared hook,<br>
a Dir::Aptitude::State outside the build root (aptitude's default)
will always fail...<br>
hrm, although I guess that is not true for --mode=root.</p>
<p>This has more edge cases than I thought.<br>
I guess if no one else is asking for this, it can go on living in
my ~/.shrc instead of in /bin/mmdebstrap.</p>
<p>PS: similar command but for apt-file not aptitude (~40% faster
than --variant=apt --include=apt-file --chrooted-customize-hook,
which would still need the --aptopt to make apt download the
Contents.xz files):</p>
<blockquote>
<p><tt>mmdebstrap forky /dev/null <a class="moz-txt-link-freetext" href="http://localhost:3142/debian">http://localhost:3142/debian</a>
--quiet --components=main,contrib,non-free,non-free-firmware
--aptopt=/etc/apt/apt.conf.d/50apt-file.conf --variant=custom
--extract-hook='APT_CONFIG=$MMDEBSTRAP_APT_CONFIG apt-file
search bdic | grep -een.AU -een.US -een.GB'</tt></p>
</blockquote>
</body>
</html>
--------------0iJmdfyyo4ZjEZhGD0WOtTZV--
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads