From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8374559CA3 for ; Tue, 8 Mar 2016 22:53:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BAC2621C016; Tue, 8 Mar 2016 22:53:03 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6A49A21C016 for ; Tue, 8 Mar 2016 22:53:03 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0462E340A35 for ; Tue, 8 Mar 2016 22:53:02 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7A4191BA0 for ; Tue, 8 Mar 2016 22:52:59 +0000 (UTC) From: "Zac Medico" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Zac Medico" Message-ID: <1457477429.b71bd1001468d367e55d3e581e43ef3c0630f2e5.zmedico@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/phase-helpers.sh X-VCS-Directories: bin/ X-VCS-Committer: zmedico X-VCS-Committer-Name: Zac Medico X-VCS-Revision: b71bd1001468d367e55d3e581e43ef3c0630f2e5 X-VCS-Branch: master Date: Tue, 8 Mar 2016 22:52:59 +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-Archives-Salt: 38d197d0-b775-44cf-80b9-7910d2721c92 X-Archives-Hash: 43669c0e085b08c6bd23369a9c77b48e commit: b71bd1001468d367e55d3e581e43ef3c0630f2e5 Author: Jason A. Donenfeld zx2c4 com> AuthorDate: Mon Mar 7 13:06:29 2016 +0000 Commit: Zac Medico gentoo org> CommitDate: Tue Mar 8 22:50:29 2016 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=b71bd100 eapply_user: allow empty directories (bug 573920) Without this, an empty directory in /etc/portage/patches/$cat/$pkg will result in an fatal error. X-Gentoo-Bug: 573920 X-Gentoo-Bug-url: https://bugs.gentoo.org/show_bug.cgi?id=573920 Signed-off-by: Jason A. Donenfeld zx2c4.com> bin/phase-helpers.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/phase-helpers.sh b/bin/phase-helpers.sh index 80f5946..1a9ee7b 100644 --- a/bin/phase-helpers.sh +++ b/bin/phase-helpers.sh @@ -1089,6 +1089,9 @@ if ___eapi_has_eapply_user; then local basedir=${PORTAGE_CONFIGROOT%/}/etc/portage/patches local d applied + local prev_shopt=$(shopt -p nullglob) + shopt -s nullglob + # possibilities: # 1. ${CATEGORY}/${P}-${PR} (note: -r0 desired to avoid applying # ${P} twice) @@ -1096,12 +1099,14 @@ if ___eapi_has_eapply_user; then # 3. ${CATEGORY}/${PN} # all of the above may be optionally followed by a slot for d in "${basedir}"/${CATEGORY}/{${P}-${PR},${P},${PN}}{,:${SLOT%/*}}; do - if [[ -d ${d} ]]; then + if [[ -n $(echo "${d}"/*.diff) || -n $(echo "${d}"/*.patch) ]]; then eapply "${d}" applied=1 fi done + ${prev_shopt} + [[ -n ${applied} ]] && ewarn "User patches applied." } fi