[OE-core] [PATCH 1/1] oe/path.py: call /bin/cp directly

Saul Wold sgw at linux.intel.com
Fri Aug 16 17:11:39 UTC 2013


On 08/13/2013 12:09 AM, wenzong.fan at windriver.com wrote:
> From: Wenzong Fan <wenzong.fan at windriver.com>
>
> This avoids running cp with interactive mode if defined:
>
>      alias cp='cp -i'
>
> Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
> ---
>   meta/lib/oe/path.py |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/lib/oe/path.py b/meta/lib/oe/path.py
> index da044ba..6933977 100644
> --- a/meta/lib/oe/path.py
> +++ b/meta/lib/oe/path.py
> @@ -97,7 +97,7 @@ def copyhardlinktree(src, dst):
>           check_output(cmd, shell=True, stderr=subprocess.STDOUT)
>           if os.path.isdir(src):
>               src = src + "/*"
> -        cmd = 'cp -afl %s %s' % (src, dst)
> +        cmd = '/bin/cp -afl %s %s' % (src, dst)

As Richard points out in the Consolidated Pull, this is the wrong way to 
go about this, there are possibly other places that will have similar 
issues and we can't fix then all this way.

A better solution is to add a sanity check and suggest that the user 
needs to fix their environment to ensure the build will succeed.

Sau!
>           check_output(cmd, shell=True, stderr=subprocess.STDOUT)
>       else:
>           copytree(src, dst)
>



More information about the Openembedded-core mailing list