Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 352406 - python_merge_intermediate_installation_images() calls 'cp --preserve=all' unsupported on Gentoo/FreeBSD
Summary: python_merge_intermediate_installation_images() calls 'cp --preserve=all' uns...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High normal
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
: 352423 352426 353947 (view as bug list)
Depends on:
Blocks: 352407
  Show dependency tree
 
Reported: 2011-01-22 12:58 UTC by Richard
Modified: 2011-02-14 20:47 UTC (History)
3 users (show)

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


Attachments
The build log that documents the failure. (build.log,8.42 KB, text/plain)
2011-01-22 15:57 UTC, Richard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard 2011-01-22 12:58:30 UTC
The build system for app-portage/layman is using GNU-isms that FreeBSD cp does not understand. That causes the ebuild to fail with "cp: illegal option -- -".

Here is an example that illustrates the issue on an actual FreeBSD installation:

# cp --force
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file ... target_directory
Comment 1 Sebastian Pipping gentoo-dev 2011-01-22 15:13:11 UTC
Grepping for "force" in neither the code of layman nor its ebuilds gave any hits.
Same goes for "fgrep -Rw cp .".  Can you point me to the place you refer to?
Comment 2 Richard 2011-01-22 15:57:27 UTC
Created attachment 260503 [details]
The build log that documents the failure.

It is not force per se, but any of the long options that are like "--force". Basically, when cp sees the second minus sign in "--some_option", it quits saying that it has an invalid input.

I don't understand the build system to say which option it is that is causing the failure, but I do know it is one of the long options that the GNU cp supports. The FreeBSD cp only supports short single character options.
Comment 3 Richard 2011-01-22 16:09:35 UTC
Actually, looking a the build.log, the issue is that --preserve=all is being passed to cp.
Comment 4 Sebastian Pipping gentoo-dev 2011-01-22 16:15:56 UTC
Renaming from "app-portage/layman-1.4.1: build failure on Gentoo/FreeBSD"
to "python eclass calls unsupported 'cp --preserve=all' on Gentoo/FreeBSD"

Re-assigning to python herd.

Thanks for reporting.
Comment 5 Richard 2011-01-22 16:20:24 UTC
*** Bug 352423 has been marked as a duplicate of this bug. ***
Comment 6 Richard 2011-01-22 16:30:54 UTC
(In reply to comment #4)
> Renaming from "app-portage/layman-1.4.1: build failure on Gentoo/FreeBSD"
> to "python eclass calls unsupported 'cp --preserve=all' on Gentoo/FreeBSD"
> 
> Re-assigning to python herd.
> 
> Thanks for reporting.
> 

You can look forward to several more bug reports in the coming weeks. I recently installed Gentoo/FreeBSD in a virtual machine, which caused me to find more than a dozen issues. I have offline things to do, but I will be filing bug reports regarding the issues as I find time. This issue is particularly profound because it affects my ability to do things on my own, so I reported it first.

By the way, here is some more information for the Python Gentoo Team. In order to get the same functionality from the FreeBSD cp, you need to pass "-p" instead of "--preserve=all". Unfortunately, this does not have quite the same meaning as the GNU cp.

The description of the GNU cp's -p option is: "same as --preserve=mode,ownership,timestamps".

The description of the GNU cp's --preserve option is: "preserve the specified attributes (default: mode,ownership,timestamps), if possible additional attributes: context, links, xattr, all".

The description of the FreeBSD -p option is: "Cause cp to preserve the following attributes of each source file in the copy: modification time, access time, file flags, file mode, user ID, and group ID, as allowed by permissions."

I am not sure if the differences are profound enough to matter. If they do not matter, a solution would be to replace "--preserve=all" with "-p". If they do matter, some sort of detection would be needed to distinguish between the GNU cp and the *BSD cp.
Comment 7 Sebastian Pipping gentoo-dev 2011-01-22 22:43:27 UTC
*** Bug 352426 has been marked as a duplicate of this bug. ***
Comment 8 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-02-07 17:31:02 UTC
*** Bug 353947 has been marked as a duplicate of this bug. ***
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-02-08 15:49:42 UTC
Please post the output of:
[[ "$(LC_ALL="C" cp --help)" == *--preserve* ]]; echo $?
Comment 10 Naohiro Aota gentoo-dev 2011-02-08 16:19:52 UTC
(In reply to comment #9)
> Please post the output of:
> [[ "$(LC_ALL="C" cp --help)" == *--preserve* ]]; echo $?
> 

$ [[ "$(LC_ALL="C" cp --help)" == *--preserve* ]]; echo $?
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file ... target_directory
1
Comment 11 Dmitri Bogomolov 2011-02-08 16:23:43 UTC
(In reply to comment #9)
> Please post the output of:
> [[ "$(LC_ALL="C" cp --help)" == *--preserve* ]]; echo $?
> 

The same as above. On fbsd-8.0.

# [[ "$(LC_ALL="C" cp --help)" == *--preserve* ]]; echo $?
cp: illegal option -- -
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpv] source_file ... target_directory
1
Comment 12 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-02-08 17:24:45 UTC
Maybe we could check 'has_version sys-apps/coreutils'. Please post the output of:
portageq has_version / sys-apps/coreutils; echo $?
Comment 13 Dmitri Bogomolov 2011-02-08 17:37:36 UTC
(In reply to comment #12)
> Maybe we could check 'has_version sys-apps/coreutils'. Please post the output
> of:
> portageq has_version / sys-apps/coreutils; echo $?
> 

# portageq has_version / sys-apps/coreutils; echo $?
1
Comment 14 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2011-02-14 20:47:10 UTC
Fixed.