Bug#863104: pbuilder: Please have PS1 inside chroots indicate that

Daniel Shahaf danielsh at apache.org
Sun May 21 19:42:54 UTC 2017


Package: pbuilder
Version: 0.215+nmu3

Dear Maintainer,

When using 'pbuilder --login' to enter a chroot, the shell's prompt does not
indicate that it's inside a chroot:

[[[
root at tarpaulin:/mnt/tmp# sudo pbuilder --login --save-after-exec --basetgz /mnt/tmp/sid2.tgz 
⋮
root at tarpaulin:/# 
]]]

Now, one can deduce that one is in a chroot:
[[[
root at tarpaulin:/# ls /home
root at tarpaulin:/# env
LC_ALL=C
PBUILDER_PKGLIBDIR=/usr/lib/pbuilder
LANG=C
SUDO_GID=0
DISPLAY=:0.0
COLORTERM=xfce4-terminal
USERNAME=root
SUDO_COMMAND=/usr/sbin/pbuilder --login --save-after-exec --basetgz /mnt/tmp/sid2.tgz
PBUILDER_SYSCONFDIR=/etc
USER=root
PWD=/
PBUILDER_PKGDATADIR=/usr/share/pbuilder
HOME=/root
SUDO_USER=root
DEBIAN_FRONTEND=noninteractive
SUDO_UID=0
MAIL=/var/mail/root
SHELL=/bin/bash
TERM=xterm
SHLVL=2
LOGNAME=root
XAUTHORITY=/home/daniel/.Xauthority
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PBCURRENTCOMMANDLINEOPERATION=--login
_=/usr/bin/env
root at tarpaulin:/# 
]]]

… but it would be easier to have the default prompt be different from the
prompt outside the chroot.

Perhaps that could be done by setting ${debian_chroot} or /etc/debian_chroot,
which /etc/bash.bashrc already check for.  The value could be a fixed string
"pbuilder", or the basetgz's basename (sic), or…

Thanks,

Daniel



More information about the Pbuilder-maint mailing list