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 B6E9F1384B4 for ; Mon, 30 Nov 2015 07:25:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B616321C01D; Mon, 30 Nov 2015 07:25:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4F3DF21C01D for ; Mon, 30 Nov 2015 07:25:01 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CD5AA3406BF for ; Mon, 30 Nov 2015 07:24:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id AA850A4A for ; Mon, 30 Nov 2015 07:24:51 +0000 (UTC) From: "Justin Lecher" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Justin Lecher" Message-ID: <1448868280.051dbce592efbbe452528d2572e85806e89b8529.jlec@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/six/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-python/six/six-1.10.0.ebuild X-VCS-Directories: dev-python/six/ X-VCS-Committer: jlec X-VCS-Committer-Name: Justin Lecher X-VCS-Revision: 051dbce592efbbe452528d2572e85806e89b8529 X-VCS-Branch: master Date: Mon, 30 Nov 2015 07:24:51 +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: 0c1a46cc-7284-4850-830d-48ff5e72c64e X-Archives-Hash: 8b1ab87f5269a548c4162f810ec3bcb5 commit: 051dbce592efbbe452528d2572e85806e89b8529 Author: Justin Lecher gentoo org> AuthorDate: Mon Nov 30 07:24:40 2015 +0000 Commit: Justin Lecher gentoo org> CommitDate: Mon Nov 30 07:24:40 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=051dbce5 dev-python/six: Run six dir QA check twice Using pkg_pretend to catch as early as possible but don't break when python impl is not installed. Use pkg_Setup to catch them all Package-Manager: portage-2.2.25 Signed-off-by: Justin Lecher gentoo.org> dev-python/six/six-1.10.0.ebuild | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/dev-python/six/six-1.10.0.ebuild b/dev-python/six/six-1.10.0.ebuild index 6161e0a..ffbb168 100644 --- a/dev-python/six/six-1.10.0.ebuild +++ b/dev-python/six/six-1.10.0.ebuild @@ -26,9 +26,23 @@ PATCHES=( "${FILESDIR}"/1.9.0-mapping.patch ) +# Run twice. +# pkg_pretend to catch as early as possible, but be forgiving if +# python impl is not installed allready. +# pkg_setup to catch them all pkg_pretend() { six_dir_check() { local dir="${ROOT}"/$(python_get_sitedir)/six + type -p "${PYTHON}" > /dev/null || return 0 + [[ -d "${dir}" ]] \ + && die "${PN} doesn't work if ${dir} is a directory #546730" + } + python_foreach_impl six_dir_check +} + +pkg_setup() { + six_dir_check() { + local dir="${ROOT}"/$(python_get_sitedir)/six [[ -d "${dir}" ]] \ && die "${PN} doesn't work if ${dir} is a directory #546730" }