dracut: avoid double copies in dracut-uefi subpackage

This commit is contained in:
Andrew J. Hesford 2020-08-03 10:26:17 -04:00
parent 46371e7636
commit d1c32883df

View file

@ -28,7 +28,6 @@ esac
case "$XBPS_TARGET_MACHINE" in case "$XBPS_TARGET_MACHINE" in
i686*|x86_64*) # archs supported by dracut for EFI bundle i686*|x86_64*) # archs supported by dracut for EFI bundle
_efi_bundle=1
subpackages+=" dracut-uefi" subpackages+=" dracut-uefi"
;; ;;
esac esac
@ -49,12 +48,6 @@ post_install() {
vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-dracut vinstall ${FILESDIR}/kernel-hook-postinst 755 etc/kernel.d/post-install 20-dracut
vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-dracut vinstall ${FILESDIR}/kernel-hook-postrm 755 etc/kernel.d/post-remove 20-dracut
if [ "${_efi_bundle}" ]; then
vinstall ${FILESDIR}/dracut-uefi-hook.confd 644 etc/default dracut-uefi-hook
vinstall ${FILESDIR}/kernel-uefi-hook-postinst 755 etc/kernel.d/post-install 20-dracut-uefi
vinstall ${FILESDIR}/kernel-uefi-hook-postrm 755 etc/kernel.d/post-remove 20-dracut-uefi
fi
# We don't need the systemd stuff. # We don't need the systemd stuff.
rm -rf ${DESTDIR}/usr/lib/dracut/modules.d/*systemd* rm -rf ${DESTDIR}/usr/lib/dracut/modules.d/*systemd*
rm -f ${DESTDIR}/usr/share/man/man8/*.service.* rm -f ${DESTDIR}/usr/share/man/man8/*.service.*
@ -62,7 +55,7 @@ post_install() {
} }
dracut-network_package() { dracut-network_package() {
depends="dhclient dracut-${version}_${revision}" depends="dhclient ${sourcepkg}-${version}_${revision}"
short_desc+=" - network modules" short_desc+=" - network modules"
archs=noarch archs=noarch
pkg_install() { pkg_install() {
@ -74,12 +67,13 @@ dracut-network_package() {
} }
dracut-uefi_package() { dracut-uefi_package() {
depends="binutils gummiboot dracut-${version}_${revision}" depends="binutils gummiboot ${sourcepkg}-${version}_${revision}"
short_desc+=" - UEFI bundle hook" short_desc+=" - UEFI bundle hook"
conf_files="/etc/default/dracut-uefi-hook" conf_files="/etc/default/dracut-uefi-hook"
pkg_install() { pkg_install() {
vmove etc/kernel.d/post-install/20-dracut-uefi vinstall ${FILESDIR}/dracut-uefi-hook.confd 644 etc/default dracut-uefi-hook
vmove etc/kernel.d/post-remove/20-dracut-uefi vinstall ${FILESDIR}/kernel-uefi-hook-postinst 755 etc/kernel.d/post-install 20-dracut-uefi
vmove etc/default/dracut-uefi-hook vinstall ${FILESDIR}/kernel-uefi-hook-postrm 755 etc/kernel.d/post-remove 20-dracut-uefi
} }
} }