2545f12e
by Johannes Schauer Marin Rodrigues at 2024-04-09T21:56:13+00:00
debian/debhelper.in/libc.preinst: skip kernel check in chrootless mode
If glibc is installed in chrootless mode (i.e. $DPKG_ROOT is not empty),
then checking the currently running kernel is not useful. At the point
where the chroot is created on system X, the kernel running on X can be
wildly different from the system Y that the chroot is supposed to run
on.
This was discovered when creating hurd chroots on linux. The tools
creating the chroot have no information about the kernel which might run
on the system that the chroot is built for.
This commits adds an additional condition to the preinst block doing
the kernel checks. It is only executed if $DPKG_ROOT is empty, in other
words, only if this is a normal installation.
Closes: #1063624