diff options
author | Ulrich Müller <ulm@gentoo.org> | 2019-05-19 11:37:27 +0200 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2019-05-19 11:38:52 +0200 |
commit | 0baeda7ca327b256ce34b40965640cebb8080f95 (patch) | |
tree | 34817295104d6eec7d688cbaad0e39ece139c739 /sys-kernel/linux-firmware | |
parent | sys-libs/glibc: refresh live ebuild patchset (diff) | |
download | gentoo-0baeda7ca327b256ce34b40965640cebb8080f95.tar.gz gentoo-0baeda7ca327b256ce34b40965640cebb8080f95.tar.bz2 gentoo-0baeda7ca327b256ce34b40965640cebb8080f95.zip |
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 <ulm@gentoo.org>
Diffstat (limited to 'sys-kernel/linux-firmware')
-rw-r--r-- | sys-kernel/linux-firmware/linux-firmware-20190514.ebuild | 6 | ||||
-rw-r--r-- | 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 02bf11f57723..be49f81c70a7 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 3c366519cb12..923cce545de5 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 |