Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Saul Wold <sgw@linux.intel.com>
To: wenzong.fan@windriver.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/1] oe/path.py: call /bin/cp directly
Date: Fri, 16 Aug 2013 10:11:39 -0700	[thread overview]
Message-ID: <520E5D4B.5020201@linux.intel.com> (raw)
In-Reply-To: <27b0ee9bd74b6c95c3ddd11b673a56d8543cd5d6.1376377523.git.wenzong.fan@windriver.com>

On 08/13/2013 12:09 AM, wenzong.fan@windriver.com wrote:
> From: Wenzong Fan <wenzong.fan@windriver.com>
>
> This avoids running cp with interactive mode if defined:
>
>      alias cp='cp -i'
>
> Signed-off-by: Wenzong Fan <wenzong.fan@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)
>


  reply	other threads:[~2013-08-16 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-13  7:09 [PATCH 0/1] oe/path.py: call /bin/cp directly wenzong.fan
2013-08-13  7:09 ` [PATCH 1/1] " wenzong.fan
2013-08-16 17:11   ` Saul Wold [this message]
2013-08-19  2:07     ` wenzong fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=520E5D4B.5020201@linux.intel.com \
    --to=sgw@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=wenzong.fan@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox