Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 390691 - dev-python/setuptools-0.6.21 fails with older coreutils
Summary: dev-python/setuptools-0.6.21 fails with older coreutils
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-16 03:04 UTC by Robin Johnson
Modified: 2011-12-19 01:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
20111201-python-coreutils-cpopts.patch (20111201-python-coreutils-cpopts.patch,1.27 KB, patch)
2011-12-02 02:26 UTC, Robin Johnson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-11-16 03:04:10 UTC
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
Comment 1 Arfrever Frehtes Taifersar Arahesis 2011-11-16 17:01:58 UTC
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.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-11-16 18:04:21 UTC
This came up while upgrading a ~4 year old box. Can we just get the coreutils added to DEPEND?
Comment 3 Arfrever Frehtes Taifersar Arahesis 2011-11-16 18:12:40 UTC
`cp -fr --preserve=all --no-preserve=context` is used in python.eclass, not in ebuilds of dev-python/setuptools.
Comment 4 Ian Delaney (RETIRED) gentoo-dev 2011-12-02 01:56:41 UTC
DEPEND=">=dev-python/setuptools-0.6.14"

4 years old box, not a common occurrence
Python team please consider
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-12-02 02:26:01 UTC
Created attachment 294471 [details, diff]
20111201-python-coreutils-cpopts.patch

Proposed change (also refactors to remove some duplication).
Comment 6 Arfrever Frehtes Taifersar Arahesis 2011-12-11 22:20:09 UTC
(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.
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2011-12-18 23:38:58 UTC
committed a variant to the tree now with your suggestions from comment #6.
Comment 8 Arfrever Frehtes Taifersar Arahesis 2011-12-19 01:26:31 UTC
(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.)