diff options
author | 2012-04-03 19:12:46 +0000 | |
---|---|---|
committer | 2012-04-03 19:12:46 +0000 | |
commit | 766a3536bdc25f57a3f4ca867197d00e94632d44 (patch) | |
tree | dafb42771f93ff0177cf156085c9431a936c0f84 /eclass/python-distutils-ng.eclass | |
parent | sci-chemistry/ccp4-apps: fix for some unknown issue resulting in #406337, tha... (diff) | |
download | gentoo-2-766a3536bdc25f57a3f4ca867197d00e94632d44.tar.gz gentoo-2-766a3536bdc25f57a3f4ca867197d00e94632d44.tar.bz2 gentoo-2-766a3536bdc25f57a3f4ca867197d00e94632d44.zip |
Add detection of collision-protect in FEATURES.
Diffstat (limited to 'eclass/python-distutils-ng.eclass')
-rw-r--r-- | eclass/python-distutils-ng.eclass | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/eclass/python-distutils-ng.eclass b/eclass/python-distutils-ng.eclass index 5b86419a7898..fe34667bef13 100644 --- a/eclass/python-distutils-ng.eclass +++ b/eclass/python-distutils-ng.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/python-distutils-ng.eclass,v 1.9 2012/03/30 16:41:40 nelchael Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/python-distutils-ng.eclass,v 1.10 2012/04/03 19:12:46 nelchael Exp $ # @ECLASS: python-distutils-ng # @MAINTAINER: @@ -51,7 +51,7 @@ fi # Set the value to "yes" to skip compilation and/or optimization of Python # modules. -EXPORT_FUNCTIONS src_prepare src_configure src_compile src_test src_install +EXPORT_FUNCTIONS pkg_pretend src_prepare src_configure src_compile src_test src_install case "${EAPI}" in 0|1|2|3) @@ -288,6 +288,17 @@ python-distutils-ng_newscript() { fi } +# Phase function: pkg_pretend +python-distutils-ng_pkg_pretend() { + if has "collision-protect" ${FEATURES}; then + eerror "Due to previous eclass compiling Python files outside of src_install" + eerror "(and not recording resulting .pyc and .pyo files as owned by any package)" + eerror "merging this package with \"collision-protect\" in FEATURES will result" + eerror "in an error, please switch to using \"protect-owned\" instead." + die "\"collision-protect\" in FEATURES detected" + fi +} + # Phase function: src_prepare python-distutils-ng_src_prepare() { [[ "${PYTHON_OPTIONAL}" = "yes" ]] && { use python || return; } |