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 A5BB113825A for ; Sun, 15 May 2016 09:30:20 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 60F9014302; Sun, 15 May 2016 09:30:10 +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 870A2142A0 for ; Sun, 15 May 2016 09:30:09 +0000 (UTC) Received: from localhost.localdomain (d202-252.icpnet.pl [109.173.202.252]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: mgorny) by smtp.gentoo.org (Postfix) with ESMTPSA id 2637F3408C7; Sun, 15 May 2016 09:30:04 +0000 (UTC) From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Cc: python@gentoo.org, =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= Subject: [gentoo-dev] [PATCH] distutils-r1.eclass: Do not apply patches if DISTUTILS_OPTIONAL is used Date: Sun, 15 May 2016 11:30:00 +0200 Message-Id: <1463304600-14662-1-git-send-email-mgorny@gentoo.org> X-Mailer: git-send-email 2.8.2 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Archives-Salt: 0ecfb7c6-1964-42a5-8c9b-247fad06e04e X-Archives-Hash: 4aa03a618e28bcc391ac28173076d9a2 Do not apply PATCHES and user patches (either via the EAPI 6 default or pre-EAPI 5 code) when DISTUTILS_OPTIONAL is being used. In this case, distutils functions are usually called conditionally, in a subdirectory, while both PATCHES and user patches are usually intended to be applied top-level. There is no ebuild relying on distutils-r1_src_prepare applying patches with DISTUTILS_OPTIONAL. In fact, there are ebuilds which work around this behavior. --- eclass/distutils-r1.eclass | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index e8de5ad..afd29ed 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -315,11 +315,13 @@ _distutils-r1_disable_ez_setup() { distutils-r1_python_prepare_all() { debug-print-function ${FUNCNAME} "${@}" - if [[ ${EAPI} != [45] ]]; then - default - else - [[ ${PATCHES} ]] && epatch "${PATCHES[@]}" - epatch_user + if [[ ! ${DISTUTILS_OPTIONAL} ]]; then + if [[ ${EAPI} != [45] ]]; then + default + else + [[ ${PATCHES} ]] && epatch "${PATCHES[@]}" + epatch_user + fi fi # by default, use in-source build if python_prepare() is used -- 2.8.2