Hi,

Quoting Trent W. Buck (2026-05-05 04:00:02)
> When debugging an mmdebstrap build, I occasionally want an interactive 
> aptitude GUI.
> Using $MMDEBSTRAP_APT_CONFIG, I can do this without bothering to install 
> aptitude inside the built environment.
> 
> This works with minor issues:
> 
>     mmdebstrap forky /dev/null 
> --customize-hook='APT_CONFIG=$MMDEBSTRAP_APT_CONFIG aptitude'
> 
> This works with no issues:
> 
>     mmdebstrap forky /dev/null 
> --customize-hook='APT_CONFIG=$MMDEBSTRAP_APT_CONFIG HOME=$1/root aptitude 
> -oDir::Aptitude::State=var/lib/aptitude' --essential-hook='mkdir -p 
> $1/var/lib/aptitude'
> 
>     or
> 
>     mmdebstrap forky /dev/null 
> --customize-hook='APT_CONFIG=$MMDEBSTRAP_APT_CONFIG HOME=$1/root aptitude 
> -oDir::Aptitude::State=var/lib/aptitude' --include=aptitude
> 
> Should mmdebstrap set Dir::Aptitude::State "var/lib/aptitude" in 
> MMDEBSTRAP_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 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

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to