Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Joshua Lock <josh@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: Re: [RFC PATCH 2/3] lib/bb/siggen.py: create permissive files and directories
Date: Thu, 10 May 2012 09:10:54 -0700	[thread overview]
Message-ID: <4FABE88E.4010002@linux.intel.com> (raw)
In-Reply-To: <1336648944.2494.128.camel@ted>



On 10/05/12 04:22, Richard Purdie wrote:
> On Wed, 2012-05-09 at 17:22 -0700, Joshua Lock wrote:
>> Create signature files, and the directories which contain them, with
>> rwx for everyone so that they are easily shared with different users
>> of the same machine.
>>
>> Signed-off-by: Joshua Lock<josh@linux.intel.com>
>> ---
>>   bitbake/lib/bb/siggen.py |    7 ++++++-
>>   1 files changed, 6 insertions(+), 1 deletions(-)
>>
>> diff --git a/bitbake/lib/bb/siggen.py b/bitbake/lib/bb/siggen.py
>> index 8c79b17..bd6d59b 100644
>> --- a/bitbake/lib/bb/siggen.py
>> +++ b/bitbake/lib/bb/siggen.py
>> @@ -201,7 +201,12 @@ class SignatureGeneratorBasic(SignatureGenerator):
>>               for dep in data['runtaskdeps']:
>>                   data['runtaskhashes'][dep] = self.taskhash[dep]
>>
>> -        p = pickle.Pickler(file(sigfile, "wb"), -1)
>> +        # Create file with permissive (0777) read/write for easier sharing
>> +        f = os.fdopen(os.open(sigfile, os.O_RDWR|os.O_CREAT), "wb")
>> +        # os.open() and os.fdopen() are affected by the users umask so brute force
>> +        # the permissions with a call to chmod
>> +        os.chmod(sigfile, 0777)
>> +        p = pickle.Pickler(f, -1)
>>           p.dump(data)
>
> Why not just run the chmod after the original pickle code? Its not as if
> you avoid a race this way :/.

Sure, that'd work as well.

Though from the general feedback it feels like this series is moot and 
all that we really want is a sanity check.

Cheers,
Joshua
-- 
Joshua Lock
         Yocto Project
         Intel Open Source Technology Centre



  reply	other threads:[~2012-05-10 16:20 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-10  0:22 [RFC PATCH 0/3] Shared state for all ! Joshua Lock
2012-05-10  0:22 ` [RFC PATCH 1/3] lib/bb/utils.py: add optional mode parameter to bb.utils.mkdirhier() Joshua Lock
2012-05-10 11:19   ` Richard Purdie
2012-05-10  0:22 ` [RFC PATCH 2/3] lib/bb/siggen.py: create permissive files and directories Joshua Lock
2012-05-10 11:22   ` Richard Purdie
2012-05-10 16:10     ` Joshua Lock [this message]
2012-05-10  0:22 ` [RFC PATCH 3/3] sstate.bbclass: ensure sstate files are easily shared Joshua Lock
2012-05-10  0:27   ` Saul Wold
2012-05-10  1:01     ` Joshua Lock
2012-05-10  0:50 ` [RFC PATCH 0/3] Shared state for all ! Chris Larson
2012-05-10  1:05   ` Joshua Lock
2012-05-10  2:15     ` Chris Larson
2012-05-10  2:32       ` Joshua Lock
2012-05-10  3:10         ` Joshua Lock
2012-05-10  3:14           ` Joshua Lock
2012-05-10  5:16             ` Khem Raj
2012-05-10 16:12               ` Joshua Lock
2012-05-10 16:31                 ` Khem Raj
2012-05-10  7:25 ` Koen Kooi
2012-05-10 16:05   ` Joshua Lock

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=4FABE88E.4010002@linux.intel.com \
    --to=josh@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox