From patchwork Sat May 12 01:21:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, 2/2] lib/bb/siggen.py: ensure dumped signatures have group R/W Date: Sat, 12 May 2012 01:21:51 -0000 From: Joshua Lock X-Patchwork-Id: 27497 Message-Id: <1336785711-13353-1-git-send-email-josh@linux.intel.com> To: bitbake-devel@lists.openembedded.org We anticipate signatures being shared amongst peers in a group so ensure they have rw-rw-r-- permissions to facilitate this. Signed-off-by: Joshua Lock --- lib/bb/siggen.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py index ca26919..5a0b80e 100644 --- a/lib/bb/siggen.py +++ b/lib/bb/siggen.py @@ -201,8 +201,10 @@ class SignatureGeneratorBasic(SignatureGenerator): for dep in data['runtaskdeps']: data['runtaskhashes'][dep] = self.taskhash[dep] - p = pickle.Pickler(open(sigfile, "wb"), -1) - p.dump(data) + with open(sigfile, "wb") as f: + p = pickle.Pickler(f, -1) + p.dump(data) + os.chmod(sigfile, 0664) def dump_sigs(self, dataCache): for fn in self.taskdeps: