[OE-core] [PATCH 1/1] sstate.bbclass: update the timestamps after install

Robert Yang liezhi.yang at windriver.com
Thu Sep 25 02:32:44 UTC 2014


On 09/25/2014 06:37 AM, Burton, Ross wrote:
> Hi Robert,
>
> On 4 September 2014 11:27, Robert Yang <liezhi.yang at 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
>
>



More information about the Openembedded-core mailing list