mklive: fix inclusion of some dkms modules

dkms makes `/var/lib/dkms` during xbps's package configuration, so if
a dkms module comes *before dkms alphabetically*, it fails `dkms add`
with `Error! No write access to DKMS tree at /var/lib/dkms` (which is
silenced by the xbps trigger)... because `/var/lib/dkms` doesn't exist
yet.

fixes: #358
This commit is contained in:
classabbyamp 2024-12-21 10:33:00 -05:00
parent 5ae016556d
commit 6a56ad61bb
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
1 changed files with 5 additions and 0 deletions

View File

@ -140,6 +140,11 @@ install_packages() {
if [ -f "$ROOTFS"/etc/default/libc-locales ]; then
sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i "$ROOTFS"/etc/default/libc-locales
fi
if xbps-query -r "$ROOTFS" dkms >/dev/null 2>&1; then
# dkms modules alphabetically before dkms can't configure
# if dkms hasn't configured beforehand to create /var/lib/dkms
chroot "$ROOTFS" env -i xbps-reconfigure dkms
fi
chroot "$ROOTFS" env -i xbps-reconfigure -a
# Cleanup and remove useless stuff.