Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/1] sstate.bbclass: update the timestamps after install
Date: Thu, 25 Sep 2014 10:32:44 +0800	[thread overview]
Message-ID: <54237ECC.5010008@windriver.com> (raw)
In-Reply-To: <CAJTo0LbKV=-sFB7=-q9zxakdfjtBzuK0rDbEwwFd-vD9_z2=+Q@mail.gmail.com>


On 09/25/2014 06:37 AM, Burton, Ross wrote:
> Hi Robert,
>
> On 4 September 2014 11:27, Robert Yang <liezhi.yang@windriver.com> wrote:
>> Under more thoughts, yes, we need the --no-dereferece otherwise the
>> touch may update the file in the SSTATE_MIRRORS, and it's safe to touch
>> a symlink itself (though "test -w" follows symlink) since the permissions
>> of symbolic links are never used.
>>
>> For readonly_dir/ssfile, we can touch the ssfile if "test -w ssfile",
>> it doesn't care about the dir's write permission. Or do we have to
>> check the permission of "dirname ${SSTATE_PKG}" and ${SSTATE_DIR} ?
>> I don't think that we need unless it causes errors.
>>
>> For the ISO, the "test -w {SSTATE_PKG}" would fail so that no touch,
>> here is the updated code, also in the repo:
>
> Can you update this patch with --no-dereference please, or have I
> misunderstood the conversation?

Thanks, updated:

   git://git.openembedded.org/openembedded-core-contrib rbt/ss

diff --git a/meta/classes/sstate.bbclass b/meta/classes/sstate.bbclass
index 4057c8c..552ff8d 100644
--- a/meta/classes/sstate.bbclass
+++ b/meta/classes/sstate.bbclass
@@ -623,6 +623,8 @@ sstate_unpack_package () {
         mkdir -p ${SSTATE_INSTDIR}
         cd ${SSTATE_INSTDIR}
         tar -xmvzf ${SSTATE_PKG}
+       # Use "! -w ||" to return true for read only files
+       [ ! -w ${SSTATE_PKG} ] || touch --no-dereference ${SSTATE_PKG}
  }

// Robert

>
> Ross
>
>


      reply	other threads:[~2014-09-25  2:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-04  7:05 [PATCH 0/1] sstate.bbclass: update the timestamps after install Robert Yang
2014-09-04  7:05 ` [PATCH 1/1] " Robert Yang
2014-09-04  8:27   ` Richard Purdie
2014-09-04  8:49     ` Robert Yang
2014-09-04  8:53       ` Richard Purdie
2014-09-04 10:27         ` Robert Yang
2014-09-04 10:29           ` Robert Yang
2014-09-24 22:37           ` Burton, Ross
2014-09-25  2:32             ` Robert Yang [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=54237ECC.5010008@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=ross.burton@intel.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