diff options
author | Krzysztof Pawlik <nelchael@gentoo.org> | 2012-04-03 19:12:46 +0000 |
---|---|---|
committer | Krzysztof Pawlik <nelchael@gentoo.org> | 2012-04-03 19:12:46 +0000 |
commit | a82aa0f1cc59d207c2692be9bbc1f12daa78b6e0 (patch) | |
tree | 872ee2d598590f2c881daeb482cdf17935361458 /eclass/python-distutils-ng.eclass | |
parent | sci-chemistry/ccp4-apps: fix for some unknown issue resulting in #406337, tha... (diff) | |
download | historical-a82aa0f1cc59d207c2692be9bbc1f12daa78b6e0.tar.gz historical-a82aa0f1cc59d207c2692be9bbc1f12daa78b6e0.tar.bz2 historical-a82aa0f1cc59d207c2692be9bbc1f12daa78b6e0.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; } |