diff options
author | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-04-30 12:06:46 -0700 |
---|---|---|
committer | Georgy Yakovlev <gyakovlev@gentoo.org> | 2021-04-30 12:12:05 -0700 |
commit | 357fcdc0bb7ce13203fb9c55bfe8241475582f88 (patch) | |
tree | 233a87e63d053ac09ed33cd1db79a10a8db23561 /sys-fs/zfs/zfs-9999.ebuild | |
parent | sys-fs/zfs: drop libressl support from live ebuild (diff) | |
download | gentoo-357fcdc0bb7ce13203fb9c55bfe8241475582f88.tar.gz gentoo-357fcdc0bb7ce13203fb9c55bfe8241475582f88.tar.bz2 gentoo-357fcdc0bb7ce13203fb9c55bfe8241475582f88.zip |
sys-fs/zfs: add soversion check function to live ebuild
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sys-fs/zfs/zfs-9999.ebuild')
-rw-r--r-- | sys-fs/zfs/zfs-9999.ebuild | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild index aefa5901450e..4292b09c8391 100644 --- a/sys-fs/zfs/zfs-9999.ebuild +++ b/sys-fs/zfs/zfs-9999.ebuild @@ -31,6 +31,7 @@ fi LICENSE="BSD-2 CDDL MIT" # just libzfs soname major for now. # possible candidates: libuutil, libzpool, libnvpair. Those do not provide stable abi, but are considered. +# see libsoversion_check() below as well SLOT="0/5" IUSE="custom-cflags debug kernel-builtin minimal nls pam python +rootfs test-suite static-libs" @@ -111,8 +112,33 @@ pkg_setup() { fi } +libsoversion_check() { + + local bugurl libzfs_sover + bugurl="https://bugs.gentoo.org/enter_bug.cgi?form_name=enter_bug&product=Gentoo+Linux&component=Current+packages" + + libzfs_sover="$(grep 'libzfs_la_LDFLAGS += -version-info' lib/libzfs/Makefile.am \ + | grep -Eo '[0-9]+:[0-9]+:[0-9]+')" + libzfs_sover="${libzfs_sover%%:*}" + + if [[ ${libzfs_sover} -ne $(ver_cut 2 ${SLOT}) ]]; then + echo + eerror "BUG BUG BUG BUG BUG BUG BUG BUG" + eerror "ebuild subslot does not match libzfs soversion!" + eerror "libzfs soversion: ${libzfs_sover}" + eerror "ebuild value: $(ver_cut 2 ${SLOT})" + eerror "This is a bug in the ebuild, please use the following URL to report it" + eerror "${bugurl}&short_desc=${CATEGORY}%2F${P}+update+subslot" + echo + # we want to abort for releases, but just print a warning for live ebuild + # to keep package installable + [[ ${PV} == "9999" ]] || die + fi +} + src_prepare() { default + libsoversion_check if [[ ${PV} == "9999" ]]; then eautoreconf |