forked from Mirror/pmbootstrap
Export HOME in pmb.chroot.root() and -.user()
Set HOME to /root for commands started with pmb.chroot.root() and to /home/pmos for commands started with pmb.chroot.user(). POSIX requires this variable to be set, see: <http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html> And this prevents a crash in "adb", which takes and alternative code path if HOME is not set, that does not work with musl (fixes #1638). Thanks to @ryang2678 for figuring this out!
This commit is contained in:
parent
8d461b2ecf
commit
5b33eb7520
2 changed files with 4 additions and 0 deletions
|
@ -70,6 +70,7 @@ def root(args, cmd, suffix="native", working_dir="/", output="log",
|
|||
# Merge env with defaults into env_all
|
||||
env_all = {"CHARSET": "UTF-8",
|
||||
"HISTFILE": "~/.ash_history",
|
||||
"HOME": "/root",
|
||||
"PATH": pmb.config.chroot_path,
|
||||
"SHELL": "/bin/ash",
|
||||
"TERM": "xterm"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue