Package: schroot Version: 1.6.10-3+deb9u1 The schroot --preserve-environment is supposed to preserve the user's environment variables. However it does not pass through environment variables which are set to the empty string:
mnementh$ FOO=bar schroot --preserve-environment -c buster-amd64-sbuild env | grep FOO FOO=bar mnementh$ FOO= schroot --preserve-environment -c buster-amd64-sbuild env | grep FOO Compare the results without schroot: mnementh$ FOO=bar env | grep FOO FOO=bar mnementh$ FOO= env | grep FOO FOO= indicating that 'env' distinguishes variables which are unset from those which are set to the empty string, but that when we run env under schroot schroot has dropped the setting of FOO. This matters because some programs treat "set to empty string" specially. For instance gcc uses "GCC_COLORS is set to the empty string" to mean "don't use color in error messages", but "GCC_COLORS is unset" to mean "use whatever the default is (for debian that means use colors)". thanks -- PMM