From: Richard Purdie <rpurdie@linux.intel.com>
To: "Lu, Lianhao" <lianhao.lu@intel.com>
Cc: "yocto@yoctoproject.org" <yocto@yoctoproject.org>
Subject: Re: why cp in do_install() change file permission mode?
Date: Fri, 10 Dec 2010 16:20:18 +0000 [thread overview]
Message-ID: <1291998019.14420.53.camel@rex> (raw)
In-Reply-To: <C10D3FB0CD45994C8A51FEC1227CE22F1B90B6C267@shsmsx502.ccr.corp.intel.com>
On Thu, 2010-12-02 at 18:16 +0800, Lu, Lianhao wrote:
> Hi fellows,
>
> Could anyone tell me why does the cp in do_install() change the file permission mode? Thanks!
>
> do_install () {
> rm -rf ${D}${installed_dir}
> install -d ${D}${installed_dir}
> cp -rp ${S}/* ${D}${installed_dir}
> }
>
> After "bitbake xxx -c install", I found the file under
> ${D}${installed_dir} had the permission mode of 0744 while the
> corresponding file under directory ${S} had the mode of 0644. Why did
> this happen? How to avoid this kind of mode change? Thanks!
do_install and all tasks that work on the output of do_install run under
pseduo which can mean the permissions on disk might not match the real
permissions as seen within a pseduo session.
To illustrate, in a do_install do something like
chown root.root somefile
ls -la somefile
then look at the file on disk and you'll see different owners. The
ownership works the same way as the permissions.
Cheers,
Richard
(Note Poky specific questions should be on the poky mailing list)
prev parent reply other threads:[~2010-12-10 16:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-02 10:16 why cp in do_install() change file permission mode? Lu, Lianhao
2010-12-02 13:55 ` Bruce Ashfield
2010-12-02 17:13 ` Hatle, Mark
2010-12-10 16:20 ` Richard Purdie [this message]
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=1291998019.14420.53.camel@rex \
--to=rpurdie@linux.intel.com \
--cc=lianhao.lu@intel.com \
--cc=yocto@yoctoproject.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.