#996438 Post install fails when run as non-root user and does not respect PKG_ROOT

#996438#5
Date:
2021-10-14 05:23:08 UTC
From:
To:
When run as a non-root user, such as when installing a package which
triggers this post install to a different root, the post install will
fail. This is in part due to update-initramfs needing privileges to
succeed. The simple fix would be to exit the script early if not run as
root. The proper fix involves respecting PKG_ROOT, which probably would
require an update to update-initramfs to allow specifying an alternate
fs root. Unfortunately, chroot can't be used here because it also
requires privileges.

Glenn