Having $TMPDIR (libpam-tmpdir) let apt plugin fail in chroot
I recently had an issue that the apt plugin would not work because I would get the error message
mktemp: failed to create file via template ‘/tmp/user/0/tmp.XXXXXXXXXX’: No such file or directory
I found out that on my host machine $TMPDIR was set to /tmp/user/0 (i.e. libpam-tmpdir is installed) which does not exists inside the chroot. As the environment variables are preserved, mktemp obviously fails.
I'm not so sure if vmdb2 is here the problem or if the user should be aware of this and simply unset the variables from the environment before running vmdb2. I temporary fixed it by creating the directory before running the apt plugin, another solution would be to patch the runcmd_chroot to remove TMPDIR from the env - but the question is then if there are instances where the user wants to have a different TMPDIR in the chroot...