diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-09-12 02:40:58 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-09-12 02:40:58 +0100 |
commit | 556db31c58f1c348b67502fa72fb1688b5a8390f (patch) | |
tree | d3c2a973b22fc2427b2357b81fab6e07ebe44d0d | |
parent | 3743bcd68178aca34e27c3f71431a4e496a6ef9b (diff) |
x11-drivers/nvidia-drivers : trigger initramfs rebuild postinstall and/or postremove
6 files changed, 54 insertions, 6 deletions
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r9 b/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r9 index f1f36675..394fadb0 100644 --- a/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r9 +++ b/metadata/md5-cache/x11-drivers/nvidia-drivers-390.157-r9 @@ -1,5 +1,5 @@ BDEPEND=sys-devel/m4 virtual/pkgconfig virtual/pkgconfig -DEFINED_PHASES=compile install postinst preinst prepare setup unpack +DEFINED_PHASES=compile install postinst postrm preinst prepare setup unpack DEPEND=acct-group/video persistenced? ( acct-user/nvpd net-libs/libtirpc:= ) x11-base/xorg-proto x11-libs/libX11 x11-libs/libXext DESCRIPTION=NVIDIA Accelerated Graphics Driver EAPI=8 @@ -14,4 +14,4 @@ RESTRICT=strip SLOT=3 SRC_URI=https://download.nvidia.com/XFree86/Linux-x86_64/390.157/NVIDIA-Linux-x86_64-390.157.run https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-390.157.tar.bz2 https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-390.157.tar.bz2 https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-390.157.tar.bz2 https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-390.157.tar.bz2 _eclasses_=desktop 56973babb9c5f19cab0eeb53ece644c6 flag-o-matic fa33e3696fe4689dda7e9affe92e2c94 multilib 7e1347c006a76bb812f3a9f663b79991 multiprocessing e644caa6eb7ce7e5ab0864383ac13ad9 readme.gentoo-r1 32b48460d813533d85f082897cec1b80 systemd 0f241b5c9f3758c3d3423df59a7f655a toolchain-funcs 948855ec7ad9f11351edf9066708dfa9 unpacker fb4b84181244b3b9990fa0bf40232dd2 user-info 9951b1a0e4f026d16c33a001fd2d5cdf -_md5_=ccff63d4f7bcadc92c88efa750e6e7c8 +_md5_=188fb4aa252a2cedaabba2eecb9d1a9f diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-470.256.02 b/metadata/md5-cache/x11-drivers/nvidia-drivers-470.256.02 index 01c726d3..1db6283c 100644 --- a/metadata/md5-cache/x11-drivers/nvidia-drivers-470.256.02 +++ b/metadata/md5-cache/x11-drivers/nvidia-drivers-470.256.02 @@ -1,5 +1,5 @@ BDEPEND=sys-devel/m4 virtual/pkgconfig virtual/pkgconfig -DEFINED_PHASES=compile install postinst preinst prepare setup unpack +DEFINED_PHASES=compile install postinst postrm preinst prepare setup unpack DEPEND=acct-group/video persistenced? ( acct-user/nvpd net-libs/libtirpc:= ) x11-base/xorg-proto x11-libs/libX11 x11-libs/libXext DESCRIPTION=NVIDIA Accelerated Graphics Driver EAPI=8 @@ -14,4 +14,4 @@ RESTRICT=strip SLOT=4 SRC_URI=https://download.nvidia.com/XFree86/Linux-x86_64/470.256.02/NVIDIA-Linux-x86_64-470.256.02.run https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-470.256.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-470.256.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-470.256.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-470.256.02.tar.bz2 _eclasses_=desktop 56973babb9c5f19cab0eeb53ece644c6 flag-o-matic fa33e3696fe4689dda7e9affe92e2c94 multilib 7e1347c006a76bb812f3a9f663b79991 multiprocessing e644caa6eb7ce7e5ab0864383ac13ad9 readme.gentoo-r1 32b48460d813533d85f082897cec1b80 systemd 0f241b5c9f3758c3d3423df59a7f655a toolchain-funcs 948855ec7ad9f11351edf9066708dfa9 unpacker fb4b84181244b3b9990fa0bf40232dd2 user-info 9951b1a0e4f026d16c33a001fd2d5cdf -_md5_=034df6efb5ef88cb70371159c17f19be +_md5_=dfc0e91f019d2335fee041df886f011a diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02 b/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02 index 8e055e44..98f524d0 100644 --- a/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02 +++ b/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02 @@ -1,5 +1,5 @@ BDEPEND=sys-devel/m4 virtual/pkgconfig virtual/pkgconfig -DEFINED_PHASES=compile install postinst preinst prepare setup unpack +DEFINED_PHASES=compile install postinst postrm preinst prepare setup unpack DEPEND=acct-group/video X? ( x11-libs/libpciaccess ) persistenced? ( acct-user/nvpd net-libs/libtirpc:= ) x11-base/xorg-proto x11-libs/libX11 x11-libs/libXext DESCRIPTION=NVIDIA Accelerated Graphics Driver EAPI=8 @@ -14,4 +14,4 @@ RESTRICT=strip SLOT=5 SRC_URI=https://download.nvidia.com/XFree86/Linux-x86_64/550.107.02/NVIDIA-Linux-x86_64-550.107.02.run https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-550.107.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-550.107.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-550.107.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-550.107.02.tar.bz2 _eclasses_=desktop 56973babb9c5f19cab0eeb53ece644c6 flag-o-matic fa33e3696fe4689dda7e9affe92e2c94 multilib 7e1347c006a76bb812f3a9f663b79991 multiprocessing e644caa6eb7ce7e5ab0864383ac13ad9 readme.gentoo-r1 32b48460d813533d85f082897cec1b80 systemd 0f241b5c9f3758c3d3423df59a7f655a toolchain-funcs 948855ec7ad9f11351edf9066708dfa9 unpacker fb4b84181244b3b9990fa0bf40232dd2 user-info 9951b1a0e4f026d16c33a001fd2d5cdf -_md5_=994b6789754cab4e83b168b7c610b389 +_md5_=17c4e2d0191f238c1333011271b13c8f diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r9.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r9.ebuild index 721729c0..bdf740c4 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r9.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.157-r9.ebuild @@ -309,6 +309,12 @@ documentation that is installed alongside this README." newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl"' } +_dracut_initramfs_regen() { + if [ -x $(which dracut) ]; then + dracut -N -f --no-hostonly-cmdline + fi +} + pkg_preinst() { # set video group id based on live system (bug #491414) local g=$(egetent group video | cut -d: -f3) @@ -317,6 +323,10 @@ pkg_preinst() { } pkg_postinst() { + if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then + _dracut_initramfs_regen + fi + readme.gentoo_print_elog ewarn ewarn "Be warned/reminded that the 390.xx branch reached end-of-life and" @@ -328,3 +338,9 @@ pkg_postinst() { ewarn "Note that there is no plans to patch in support for kernels branches" ewarn "newer than 6.1.x which will be supported upstream until December 2026." } + +pkg_postrm() { + if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then + _dracut_initramfs_regen + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02.ebuild index 3e3bac4b..e9e45d49 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.256.02.ebuild @@ -287,6 +287,12 @@ documentation that is installed alongside this README." newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/char"' } +_dracut_initramfs_regen() { + if [ -x $(which dracut) ]; then + dracut -N -f --no-hostonly-cmdline + fi +} + pkg_preinst() { # set video group id based on live system (bug #491414) local g=$(egetent group video | cut -d: -f3) @@ -295,6 +301,10 @@ pkg_preinst() { } pkg_postinst() { + if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then + _dracut_initramfs_regen + fi + readme.gentoo_print_elog if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then @@ -303,3 +313,9 @@ pkg_postinst() { ewarn "${PN}. Bug: https://bugs.gentoo.org/796329" fi } + +pkg_postrm() { + if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then + _dracut_initramfs_regen + fi +} diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02.ebuild index 8fd26de5..5d60b6a8 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02.ebuild @@ -307,6 +307,12 @@ documentation that is installed alongside this README." newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"' } +_dracut_initramfs_regen() { + if [ -x $(which dracut) ]; then + dracut -N -f --no-hostonly-cmdline + fi +} + pkg_preinst() { # set video group id based on live system (bug #491414) local g=$(egetent group video | cut -d: -f3) @@ -315,6 +321,10 @@ pkg_preinst() { } pkg_postinst() { + if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then + _dracut_initramfs_regen + fi + readme.gentoo_print_elog if [[ $(</proc/cmdline) == *slub_debug=[!-]* ]]; then @@ -323,3 +333,9 @@ pkg_postinst() { ewarn "${PN}. Bug: https://bugs.gentoo.org/796329" fi } + +pkg_postrm() { + if [ $(stat -c %d:%i /) == $(stat -c %d:%i /proc/1/root/.) ]; then + _dracut_initramfs_regen + fi +} |