summaryrefslogtreecommitdiff
path: root/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-06-15 14:57:03 +0100
commitd18bf1e01b65ee4bf0c804e2843b282d3d4e5d7c (patch)
tree4a95cbc6ffdf13bad6ecbc7f8d5af99631984123 /sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
parente748ba9741f6540f4675c23e3e37b73e822c13a4 (diff)
gentoo resync : 15.06.2021
Diffstat (limited to 'sys-fs/zfs-kmod/zfs-kmod-9999.ebuild')
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-9999.ebuild24
1 files changed, 20 insertions, 4 deletions
diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
index f57ff9699ac8..27cf80ed4300 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild
@@ -27,7 +27,7 @@ else
fi
LICENSE="CDDL MIT debug? ( GPL-2+ )"
-SLOT="0"
+SLOT="0/${PVR}"
IUSE="custom-cflags debug +rootfs"
RDEPEND="${DEPEND}
@@ -43,10 +43,25 @@ if [[ ${PV} != "9999" ]] ; then
BDEPEND+=" verify-sig? ( app-crypt/openpgp-keys-openzfs )"
fi
+# PDEPEND in this form is needed to trick portage suggest
+# enabling dist-kernel if only 1 package have it set
+PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
+
RESTRICT="debug? ( strip ) test"
DOCS=( AUTHORS COPYRIGHT META README.md )
+pkg_pretend() {
+ use rootfs || return 0
+
+ if has_version virtual/dist-kernel && ! use dist-kernel; then
+ ewarn "You have virtual/dist-kernel installed, but"
+ ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
+ ewarn "It's recommended to globally enable dist-kernel USE flag"
+ ewarn "to auto-trigger initrd rebuilds with kernel updates"
+ fi
+}
+
pkg_setup() {
CONFIG_CHECK="
!DEBUG_LOCK_ALLOC
@@ -91,9 +106,10 @@ pkg_setup() {
src_prepare() {
default
- if [[ ${PV} == "9999" ]]; then
- eautoreconf
- else
+ # Run unconditionally (bug #792627)
+ eautoreconf
+
+ if [[ ${PV} != "9999" ]]; then
# Set module revision number
sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
fi