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 18FE715800F for ; Sun, 15 Jan 2023 15:12:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 625A6E07DB; Sun, 15 Jan 2023 15:12: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) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 45473E07DB for ; Sun, 15 Jan 2023 15:12: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 36AFC340F56 for ; Sun, 15 Jan 2023 15:12:36 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id C908A738 for ; Sun, 15 Jan 2023 15:12:33 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1673795544.793e2d209234d2e90ca28f37f5474d619b455f9f.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-fs/lvm2/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-fs/lvm2/lvm2-2.03.17-r1.ebuild sys-fs/lvm2/lvm2-2.03.17-r2.ebuild X-VCS-Directories: sys-fs/lvm2/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 793e2d209234d2e90ca28f37f5474d619b455f9f X-VCS-Branch: master Date: Sun, 15 Jan 2023 15:12:33 +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: ac5ba3bd-b0f3-4439-9477-568aa2708441 X-Archives-Hash: 790df79c48dcf5fb38d93fa4d06ef39d commit: 793e2d209234d2e90ca28f37f5474d619b455f9f Author: Sam James gentoo org> AuthorDate: Sun Jan 15 15:10:34 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sun Jan 15 15:12:24 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=793e2d20 sys-fs/lvm2: add pkg_postinst warning for USE=lvm -> USE=-lvm I was reluctant to do this because we already published a news item (and it's the critical news item mechanism for a reason) but if it saves someone some pain, it's worth it, and it's cheap to do. Show a warning for USE=-lvm -> USE=lvm or for fresh installs with USE=-lvm as a one-off. But warnings are not a substitute for reading news items, so this is mostly for the benefit of new users who might be confused about how to get the tools they're familiar with. Bug: https://bugs.gentoo.org/718910 Bug: https://bugs.gentoo.org/890254 Signed-off-by: Sam James gentoo.org> ...m2-2.03.17-r1.ebuild => lvm2-2.03.17-r2.ebuild} | 39 ++++++++++++++++------ 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/sys-fs/lvm2/lvm2-2.03.17-r1.ebuild b/sys-fs/lvm2/lvm2-2.03.17-r2.ebuild similarity index 90% rename from sys-fs/lvm2/lvm2-2.03.17-r1.ebuild rename to sys-fs/lvm2/lvm2-2.03.17-r2.ebuild index f0470c0a4165..27f458ee325f 100644 --- a/sys-fs/lvm2/lvm2-2.03.17-r1.ebuild +++ b/sys-fs/lvm2/lvm2-2.03.17-r2.ebuild @@ -263,20 +263,37 @@ src_install() { dodoc README VERSION* WHATS_NEW WHATS_NEW_DM doc/*.{c,txt} conf/*.conf } -pkg_postinst() { - use lvm && tmpfiles_process lvm2.conf +pkg_preinst() { + HAD_LVM=0 - if use udev; then - udev_reload + if has_version 'sys-fs/lvm2[lvm(+)]' ; then + HAD_LVM=1 fi +} +pkg_postinst() { + use lvm && tmpfiles_process lvm2.conf + use udev && udev_reload + + # This is a new installation if [[ -z "${REPLACING_VERSIONS}" ]]; then - # This is a new installation - ewarn "Make sure the \"lvm\" init script is in the runlevels:" - ewarn "# rc-update add lvm boot" - ewarn - ewarn "Make sure to enable lvmetad in /etc/lvm/lvm.conf if you want" - ewarn "to enable lvm autoactivation and metadata caching." + if use lvm ; then + ewarn "Make sure the \"lvm\" init script is in the runlevels:" + ewarn "# rc-update add lvm boot" + ewarn + ewarn "Make sure to enable lvmetad in ${EROOT}/etc/lvm/lvm.conf if you want" + ewarn "to enable lvm autoactivation and metadata caching." + else + ewarn "Please enable USE=lvm if you need the LVM daemon and" + ewarn "tools like 'lvchange', 'vgchange', etc!" + fi + else + if ! use lvm && [[ ${HAD_LVM} -eq 1 ]] ; then + ewarn "LVM was previously enabled but is now disabled." + ewarn "Please enable USE=lvm if you need the LVM daemon and" + ewarn "tools like 'lvchange', 'vgchange', etc!" + ewarn "See the 2022-11-19-lvm2-default-USE-flags news item for more details." + fi fi if use udev && [[ -d /run ]] ; then @@ -291,7 +308,7 @@ pkg_postinst() { ewarn "" ewarn " ${permission_run_expected} /run" ewarn "" - ewarn "This is known to be causing problems for UDEV-enabled LVM services." + ewarn "This is known to cause problems for udev-enabled LVM services." fi fi }