reading manifest template 'MANIFEST.in' writing manifest file 'distribute.egg-info/SOURCES.txt' Copying distribute.egg-info to /var/tmp/portage/dev-python/setuptools-0.6.21/temp/images/2.6/usr/lib/python2.6/site-packages/distribute-0.6.21-py2.6.egg-info running install_scripts Installing easy_install script to /var/tmp/portage/dev-python/setuptools-0.6.21/temp/images/2.6/usr/bin cp: invalid argument `context' for `--preserve' Valid arguments are: - `mode' - `timestamps' - `ownership' - `links' - `all' Try `cp --help' for more information. * ERROR: dev-python/setuptools-0.6.21 failed (install phase): * Merging of intermediate installation image for Python ABI '2.6 into installation image failed * * Call stack: * ebuild.sh, line 56: Called src_install * environment, line 10681: Called distutils_src_install * environment, line 6892: Called python_merge_intermediate_installation_images '/var/tmp/portage/dev-python/setuptools-0.6.21/temp/images' * environment, line 10055: Called die * The specific snippet of code: * cp -fr --preserve=all --no-preserve=context "${intermediate_installation_images_directory}/${PYTHON_ABI}/"* "${D}" || die "Merging of intermediate installation image for Python ABI '${PYTHON_ABI} into installation image failed"; * * If you need support, post the output of 'emerge --info =dev-python/setuptools-0.6.21', * the complete build log and the output of 'emerge -pqv =dev-python/setuptools-0.6.21'. * The complete build log is located at '/var/tmp/portage/dev-python/setuptools-0.6.21/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-python/setuptools-0.6.21/temp/environment'. * S: '/var/tmp/portage/dev-python/setuptools-0.6.21/work/distribute-0.6.21' >>> Failed to emerge dev-python/setuptools-0.6.21, Log file: # cp --version cp (GNU coreutils) 6.4 # cp --help (trimmed) -p same as --preserve=mode,ownership,timestamps --preserve[=ATTR_LIST] preserve the specified attributes (default: mode,ownership,timestamps), if possible additional attributes: links, all
NEWS file says that `cp` accepts --preserve=context option since release 6.9.90 (2007-12-01). sys-apps/coreutils-7.1 was stabilized about 2.5 years ago. Upgrade path is required for systems not upgraded for 1 year, so it seems that python_merge_intermediate_installation_images() doesn't need to support <sys-apps/coreutils-6.9.90.
This came up while upgrading a ~4 year old box. Can we just get the coreutils added to DEPEND?
`cp -fr --preserve=all --no-preserve=context` is used in python.eclass, not in ebuilds of dev-python/setuptools.
DEPEND=">=dev-python/setuptools-0.6.14" 4 years old box, not a common occurrence Python team please consider
Created attachment 294471 [details, diff] 20111201-python-coreutils-cpopts.patch Proposed change (also refactors to remove some duplication).
(In reply to comment #5) 6.9.90 is the version, which introduced --preserve=context and --no-preserve=context options. --preserve=all option was introduced in 4.1.1. The oldest version of sys-apps/coreutils present in gentoo-x86 was 4.5.9. There were some older versions of sys-apps/fileutils. (All variables not used in later functions should be marked as local. Names of variables should be consistent with style of eclass. 'cp_options' would be valid name of variable.) I suggest to not introduce a new variable. (It allows Portage to show what options were used when copying fails. Portage doesn't expand variables in line of code shown in die() message.) Some characters should be quoted to avoid treating of them as redirection.
committed a variant to the tree now with your suggestions from comment #6.
(In reply to comment #6) > Some characters should be quoted to avoid treating of them as redirection. (In reply to comment #7) You are trying to redirect output of first has_version() to nonexistent =sys-apps/coreutils-6.9.90 file. (This breaks support for SELinux users, who need --no-preserve=context.)