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 1B950138334 for ; Sun, 19 May 2019 09:39:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1DBF0E08A6; Sun, 19 May 2019 09:39:30 +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 F347CE08A6 for ; Sun, 19 May 2019 09:39:29 +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 84D86344A3A for ; Sun, 19 May 2019 09:39:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8B012566 for ; Sun, 19 May 2019 09:39:26 +0000 (UTC) From: "Ulrich Müller" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ulrich Müller" Message-ID: <1558258732.0baeda7ca327b256ce34b40965640cebb8080f95.ulm@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-20190514.ebuild sys-kernel/linux-firmware/linux-firmware-99999999.ebuild X-VCS-Directories: sys-kernel/linux-firmware/ X-VCS-Committer: ulm X-VCS-Committer-Name: Ulrich Müller X-VCS-Revision: 0baeda7ca327b256ce34b40965640cebb8080f95 X-VCS-Branch: master Date: Sun, 19 May 2019 09:39:26 +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: f602df56-a28a-4a13-b7df-04e8733a5b20 X-Archives-Hash: 68ac6ac5da5eff2f2278f20e15bfbea2 commit: 0baeda7ca327b256ce34b40965640cebb8080f95 Author: Ulrich Müller gentoo org> AuthorDate: Sun May 19 09:37:27 2019 +0000 Commit: Ulrich Müller gentoo org> CommitDate: Sun May 19 09:38:52 2019 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0baeda7c sys-kernel/linux-firmware: Explicitly check for empty removal list. Closes: https://bugs.gentoo.org/686288 Package-Manager: Portage-2.3.66, Repoman-2.3.12 Signed-off-by: Ulrich Müller gentoo.org> sys-kernel/linux-firmware/linux-firmware-20190514.ebuild | 6 +++++- sys-kernel/linux-firmware/linux-firmware-99999999.ebuild | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys-kernel/linux-firmware/linux-firmware-20190514.ebuild b/sys-kernel/linux-firmware/linux-firmware-20190514.ebuild index 02bf11f5772..be49f81c70a 100644 --- a/sys-kernel/linux-firmware/linux-firmware-20190514.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-20190514.ebuild @@ -249,6 +249,7 @@ src_prepare() { local file preserved_files=() remove=() + ebegin "Removing all files not listed in config" while IFS= read -r file; do # Ignore comments. if [[ ${file} != "#"* ]]; then @@ -259,7 +260,10 @@ src_prepare() { while IFS= read -d "" -r file; do has "${file}" "${preserved_files[@]}" || remove+=("${file}") done < <(find * ! -type d ! -name ${PN}.conf -print0 || die) - printf "%s\0" "${remove[@]}" | xargs -0 --no-run-if-empty rm || die + if [[ ${#remove[@]} -gt 0 ]]; then + printf "%s\0" "${remove[@]}" | xargs -0 rm || die + fi + eend 0 fi # remove empty directories, bug #396073 diff --git a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild index 3c366519cb1..923cce545de 100644 --- a/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild +++ b/sys-kernel/linux-firmware/linux-firmware-99999999.ebuild @@ -249,6 +249,7 @@ src_prepare() { local file preserved_files=() remove=() + ebegin "Removing all files not listed in config" while IFS= read -r file; do # Ignore comments. if [[ ${file} != "#"* ]]; then @@ -259,7 +260,10 @@ src_prepare() { while IFS= read -d "" -r file; do has "${file}" "${preserved_files[@]}" || remove+=("${file}") done < <(find * ! -type d ! -name ${PN}.conf -print0 || die) - printf "%s\0" "${remove[@]}" | xargs -0 --no-run-if-empty rm || die + if [[ ${#remove[@]} -gt 0 ]]; then + printf "%s\0" "${remove[@]}" | xargs -0 rm || die + fi + eend 0 fi # remove empty directories, bug #396073