From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: openembedded-core <openembedded-core@lists.openembedded.org>
Subject: [PATCH] sstatesig: Allow the BB_HASHFILENAME to be passed in for comparision purposes
Date: Thu, 19 Dec 2013 09:39:04 +0000 [thread overview]
Message-ID: <1387445944.6402.63.camel@ted> (raw)
Currently the code can match too many things, for example, searching for
gcc-cross, we'd also get gcc-cross-initial.
If we have a bitbake cache available, we'd often have the BB_HASHFILENAME
data available from that cache. That can give us something to filter the
matches against.
The format of that field is metadata defined so it needs to be processed
in a metadata function (which find_siginfo is).
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/meta/lib/oe/sstatesig.py b/meta/lib/oe/sstatesig.py
index b13d11c..836a148 100644
--- a/meta/lib/oe/sstatesig.py
+++ b/meta/lib/oe/sstatesig.py
@@ -85,7 +85,7 @@ bb.siggen.SignatureGeneratorOEBasic = SignatureGeneratorOEBasic
bb.siggen.SignatureGeneratorOEBasicHash = SignatureGeneratorOEBasicHash
-def find_siginfo(pn, taskname, taskhashlist, d):
+def find_siginfo(pn, taskname, taskhashlist, d, hashfn = None):
""" Find signature data files for comparison purposes """
import fnmatch
@@ -94,6 +94,10 @@ def find_siginfo(pn, taskname, taskhashlist, d):
if taskhashlist:
hashfiles = {}
+ # This is based on BB_HASHFILENAME set for the recipe and provided from the cache
+ if hashfn:
+ hashfn = hashfn.split(" ")[1]
+
if not taskname:
# We have to derive pn and taskname
key = pn
@@ -157,6 +161,8 @@ def find_siginfo(pn, taskname, taskhashlist, d):
for fn in files:
fullpath = os.path.join(root, fn)
if fnmatch.fnmatch(fullpath, filespec):
+ if hashfn and not os.path.basename(fullpath).startswith(hashfn):
+ continue
if taskhashlist:
hashfiles[hashval] = fullpath
else:
reply other threads:[~2013-12-19 9:39 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1387445944.6402.63.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--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