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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 76191138334 for ; Sat, 3 Aug 2019 17:42:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 83DFBE089D; Sat, 3 Aug 2019 17:42:15 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4F6B9E089D for ; Sat, 3 Aug 2019 17:42:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6301A34938F for ; Sat, 3 Aug 2019 17:42:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 61A7E703 for ; Sat, 3 Aug 2019 17:42:11 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1564854125.ab67f953d2114b604581132459ed7a9e4cbdf4df.whissi@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-kernel/linux-firmware/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-kernel/linux-firmware/linux-firmware-20190726-r2.ebuild sys-kernel/linux-firmware/linux-firmware-99999999.ebuild X-VCS-Directories: sys-kernel/linux-firmware/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: ab67f953d2114b604581132459ed7a9e4cbdf4df X-VCS-Branch: master Date: Sat, 3 Aug 2019 17:42:11 +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: 7f411876-d8e7-4e5e-8326-c8e5fa3c5631 X-Archives-Hash: e45e7b43ee28457c78f68c08b6f0b20e commit: ab67f953d2114b604581132459ed7a9e4cbdf4df Author: Thomas Deutschmann gentoo org> AuthorDate: Sat Aug 3 17:41:05 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Sat Aug 3 17:42:05 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab67f953 sys-kernel/linux-firmware: hide mount-boot function calls behind USE flag This will avoid unnecessary mount/umount of /boot when USE=-initramfs. Package-Manager: Portage-2.3.69, Repoman-2.3.16 Signed-off-by: Thomas Deutschmann gentoo.org> .../linux-firmware-20190726-r2.ebuild | 21 ++++++++++++++++++--- .../linux-firmware/linux-firmware-99999999.ebuild | 21 ++++++++++++++++++--- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/sys-kernel/linux-firmware/linux-firmware-20190726-r2.ebuild b/sys-kernel/linux-firmware/linux-firmware-20190726-r2.ebuild index 6e50d29e9c7..0dfd117b3b8 100644 --- a/sys-kernel/linux-firmware/linux-firmware-20190726-r2.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-20190726-r2.ebuild @@ -27,6 +27,7 @@ RESTRICT="binchecks strip BDEPEND="initramfs? ( app-arch/cpio )" +#add anything else that collides to this RDEPEND="!savedconfig? ( redistributable? ( !sys-firmware/alsa-firmware[alsa_cards_ca0132] @@ -71,7 +72,9 @@ RDEPEND="!savedconfig? ( ) )" -#add anything else that collides to this +pkg_pretend() { + use initramfs && mount-boot_pkg_pretend +} src_unpack() { if [[ ${PV} == 99999999* ]]; then @@ -317,7 +320,8 @@ pkg_preinst() { ewarn "USE=savedconfig is active. You must handle file collisions manually." fi - mount-boot_pkg_preinst + # Make sure /boot is available if needed. + use initramfs && mount-boot_pkg_preinst } pkg_postinst() { @@ -335,5 +339,16 @@ pkg_postinst() { fi done - mount-boot_pkg_postinst + # Don't forget to umount /boot if it was previously mounted by us. + use initramfs && mount-boot_pkg_postinst +} + +pkg_prerm() { + # Make sure /boot is mounted so that we can remove /boot/amd-uc.img! + use initramfs && mount-boot_pkg_prerm +} + +pkg_postrm() { + # Don't forget to umount /boot if it was previously mounted by us. + use initramfs && mount-boot_pkg_postrm } diff --git a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild index 6fd9059b3d5..0211e6e23f2 100644 --- a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild @@ -27,6 +27,7 @@ RESTRICT="binchecks strip BDEPEND="initramfs? ( app-arch/cpio )" +#add anything else that collides to this RDEPEND="!savedconfig? ( redistributable? ( !sys-firmware/alsa-firmware[alsa_cards_ca0132] @@ -71,7 +72,9 @@ RDEPEND="!savedconfig? ( ) )" -#add anything else that collides to this +pkg_pretend() { + use initramfs && mount-boot_pkg_pretend +} src_unpack() { if [[ ${PV} == 99999999* ]]; then @@ -317,7 +320,8 @@ pkg_preinst() { ewarn "USE=savedconfig is active. You must handle file collisions manually." fi - mount-boot_pkg_preinst + # Make sure /boot is available if needed. + use initramfs && mount-boot_pkg_preinst } pkg_postinst() { @@ -335,5 +339,16 @@ pkg_postinst() { fi done - mount-boot_pkg_postinst + # Don't forget to umount /boot if it was previously mounted by us. + use initramfs && mount-boot_pkg_postinst +} + +pkg_prerm() { + # Make sure /boot is mounted so that we can remove /boot/amd-uc.img! + use initramfs && mount-boot_pkg_prerm +} + +pkg_postrm() { + # Don't forget to umount /boot if it was previously mounted by us. + use initramfs && mount-boot_pkg_postrm }