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
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?
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.
Actually, looking a the build.log, the issue is that --preserve=all is being passed to cp.
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.
*** Bug 352423 has been marked as a duplicate of this bug. ***
(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.
*** Bug 352426 has been marked as a duplicate of this bug. ***
*** Bug 353947 has been marked as a duplicate of this bug. ***
Please post the output of: [[ "$(LC_ALL="C" cp --help)" == *--preserve* ]]; echo $?
(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
(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
Maybe we could check 'has_version sys-apps/coreutils'. Please post the output of: portageq has_version / sys-apps/coreutils; echo $?
(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
Fixed.