New comment by sgn on void-packages repository https://github.com/void-linux/void-packages/pull/26939#issuecomment-739098547 Comment: We can simplify the whole mess by carefully reorder `subpackages`: ```diff diff --git a/srcpkgs/linux-firmware/template b/srcpkgs/linux-firmware/template index 9e335af903..c13a8c4601 100644 --- a/srcpkgs/linux-firmware/template +++ b/srcpkgs/linux-firmware/template @@ -12,6 +12,9 @@ checksum=3cbb7f363dc63686b1c6e325ed679f6faa4715f17fa06be11b705456e1d5dcb9 python_version=3 nostrip=yes +subpackages="rpi-firmware-network linux-firmware-amd linux-firmware-intel + linux-firmware-nvidia linux-firmware-network" + do_install() { vmkdir usr/lib/firmware vmkdir usr/share/licenses/${pkgname} @@ -53,6 +56,7 @@ linux-firmware-nvidia_package() { linux-firmware-network_package() { short_desc+=" - network" + depends="rpi-firmware-network" nostrip=yes pkg_install() { vmove usr/lib/firmware/3com @@ -61,6 +65,7 @@ linux-firmware-network_package() { vmove "usr/lib/firmware/ath*" vmove "usr/lib/firmware/ar*" vmove "usr/lib/firmware/bnx2*" + vmove usr/lib/firmware/brcm vmove "usr/lib/firmware/cxgb*" vmove "usr/lib/firmware/htc*" vmove "usr/lib/firmware/iwl*" @@ -72,13 +77,6 @@ linux-firmware-network_package() { vmove usr/lib/firmware/ueagle-atm vmove usr/lib/firmware/ti-connectivity vmove usr/lib/firmware/dpaa2 - - # Move only non-Raspberry Pi related brcm firmware files. - # Cannont use vmove since one of the files has a space in it, - # so manually create destination folder and move files. - mkdir -p ${PKGDESTDIR}/usr/lib/firmware/brcm - find ${DESTDIR}/usr/lib/firmware/brcm/* ! -iname 'brcmfmac434??-sdio.*' \ - | while read f; do mv "$f" ${PKGDESTDIR}/usr/lib/firmware//brcm; done } } ``` Not sure if it's better, though. And, I'm not even sure if `linux-firmware-network` should depend on `rpi-firmware-network` or not. There's a lot of warning about some `_package` not being used, which is a bug of `xbps-src`. I'll post a patch for that warning, soon.