From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 48D60158003 for ; Sat, 3 Dec 2022 21:59:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 54DF52BC060; Sat, 3 Dec 2022 21:59:38 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3DA042BC060 for ; Sat, 3 Dec 2022 21:59:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4784A341522 for ; Sat, 3 Dec 2022 21:59:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id BB92E692 for ; Sat, 3 Dec 2022 21:59:35 +0000 (UTC) From: "Georgy Yakovlev" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Georgy Yakovlev" Message-ID: <1670104769.2d475f8a7b560fe09d760d56ce9787688d848390.gyakovlev@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/zfs-kmod/zfs-kmod-9999.ebuild X-VCS-Directories: sys-fs/zfs-kmod/ X-VCS-Committer: gyakovlev X-VCS-Committer-Name: Georgy Yakovlev X-VCS-Revision: 2d475f8a7b560fe09d760d56ce9787688d848390 X-VCS-Branch: master Date: Sat, 3 Dec 2022 21:59:35 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d4bd8993-494f-490f-a967-4919e7dd9805 X-Archives-Hash: 49a8bff1bdc359c126565c15ad31c67a commit: 2d475f8a7b560fe09d760d56ce9787688d848390 Author: Georgy Yakovlev gentoo org> AuthorDate: Sat Dec 3 21:55:42 2022 +0000 Commit: Georgy Yakovlev gentoo org> CommitDate: Sat Dec 3 21:59:29 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d475f8a sys-fs/zfs-kmod: improve new module check in live ebuild Closes: https://github.com/gentoo/gentoo/pull/28498 Signed-off-by: Georgy Yakovlev gentoo.org> sys-fs/zfs-kmod/zfs-kmod-9999.ebuild | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild index 3e4508af22fc..b31dd845873c 100644 --- a/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild +++ b/sys-fs/zfs-kmod/zfs-kmod-9999.ebuild @@ -210,8 +210,10 @@ _old_layout_cleanup() { pkg_postinst() { # check for old module layout before doing anything else. # only attempt layout cleanup if new .ko location is used. - [[ -f "${EROOT}/lib/modules/${KV_FULL}/extra/zfs.ko" ]] && _old_layout_cleanup - + local newko=( "${EROOT}/lib/modules/${KV_FULL}/extra"/{zfs,spl}.ko* ) + # we check first array member, if glob above did not exand, it will be "zfs.ko*" and -f will return false. + # if glob expanded -f will do correct file precense check. + [[ -f ${newko[0]} ]] && _old_layout_cleanup linux-mod_pkg_postinst if [[ -z ${ROOT} ]] && use dist-kernel; then