sys-kernel/linux-firmware: More useful error message for empty package.
authorUlrich Müller <ulm@gentoo.org>
Sun, 19 May 2019 22:46:13 +0000 (00:46 +0200)
committerUlrich Müller <ulm@gentoo.org>
Sun, 19 May 2019 22:46:44 +0000 (00:46 +0200)
Closes: https://bugs.gentoo.org/686330
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
sys-kernel/linux-firmware/linux-firmware-20190514.ebuild
sys-kernel/linux-firmware/linux-firmware-99999999.ebuild

index ed7bc463cb3881d6f5123d06750bc43b69cdb721..ef067f814223aeb91f40706cebf741dda1768b21 100644 (file)
@@ -278,6 +278,13 @@ src_install() {
                save_config ${PN}.conf
        fi
        rm ${PN}.conf || die
+
+       if ! ( shopt -s failglob; : * ) 2>/dev/null; then
+               eerror "No files to install. Check your USE flag settings"
+               eerror "and the list of files in your saved configuration."
+               die "Refusing to install an empty package"
+       fi
+
        insinto /lib/firmware/
        doins -r *
 }
index f9f30c6799ac1a18614aea9599cdead788caee14..398592afd42bf980b2777f17eedeb62315ae0e76 100644 (file)
@@ -278,6 +278,13 @@ src_install() {
                save_config ${PN}.conf
        fi
        rm ${PN}.conf || die
+
+       if ! ( shopt -s failglob; : * ) 2>/dev/null; then
+               eerror "No files to install. Check your USE flag settings"
+               eerror "and the list of files in your saved configuration."
+               die "Refusing to install an empty package"
+       fi
+
        insinto /lib/firmware/
        doins -r *
 }