Commit Graph

34 Commits

Author SHA1 Message Date
Matthew McClintock 23c6b49566 siggen.py: If both sigs have a variable in it's whitelist then don't say it's changed
Some BB_HASHBASE_WHITELIST variables are in the lists of variable
dependencies for signatures. Ignore those differences in lists
since this difference does not matter

(Bitbake rev: 71b53a3f0766ca464560a1f6a449f9424fbdf7ae)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:16:13 +00:00
Richard Purdie 3796541746 bitbake/siggen.py: Don't backtrace if the taskhash data isn't present
This allows the code to safely fall back to dumping the basehash data
if the taskhash data isn't present for some reason. We could effecitvely
obsolete the runtime option and use this approach instead exclusively.

(Bitbake rev: 5ace320ccc01f4e326f90b7ba060dcbff3380dca)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:16:13 +00:00
Richard Purdie 9a68fb1364 data/siggen: Add vardepvalue mechanism to allow the variable dependency code to be forced to specific values
We have a problem if we want to inject specific information into the variable
dependency code. There are cases for example where we want a dependency
on the value of X but it doesn't matter how X was constructed or what
dependencies it might have had, we only care about the absolute value.
With the current code, its near enough impossible to do this.

This patch adds such a mechanism so the user can trigger this with code like:

baselib[vardepvalue] = "${baselib}"

It also refactors some of the code so we do variable lookups once
instead of doing this in two different functions.

[YOCTO #1583]

(Bitbake rev: 6c879b44ccf42dc73fe4467076e114700d7ba81b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:16:12 +00:00
Matthew McClintock 6803d97bdb siggen.py: sort task hash depedencies with basepath
Without this patch the tash hash dependencies can be in a order
that is dependent upon directory/filesystem layout. With this
change the data is sorted the same regardless.

Without this the dependent hashes could be in different orders
on different systems and consequently final md5 hash would differ
as well even though nothing else changed.

(Bitbake rev: 9a2029899c946ce9aa8adbc85f2cfe7a85b92182)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:16:12 +00:00
Matthew McClintock 81ed10442b bitbake: print out symmetric difference when comparing sigs
This is useful for really longs lists to pinpoint what has
actually changed

(Bitbake rev: f1eb6d3dcc10c42bb09383a87bde3afa69bc6ed9)

Signed-off-by: Matthew McClintock <msm@freescale.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:16:12 +00:00
Richard Purdie 388dbe4928 siggen.py: Include list of variables in hashes
Ensure that the list of dependencies is included in the hash
as well as their contents

Prior to this, adding or removing dependencies with values
of "None" would not change the hash, despite diffsigs reporting
this difference.

(Bitbake rev: 727ca945177ce9bd44515cf611e3e95a09466d98)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:16:11 +00:00
Richard Purdie dbcce81f66 siggen.py: Fix diffsigs output for filename comparisions
When comparing sig files, if the recipe locations had changed, the
dependent tasks list would show as changed even if the actual hash
had not changed. This updates the code to only compare the base part
of the pathnames.

It also tweaks some of the output to add newlines to aid comparing
two lists of variables as it makes the location of the difference
clearer.

(Bitbake rev: 165a22ddcc647b945707fb5c483146bb336d5f66)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-30 16:16:11 +00:00
Dmitry Eremin-Solenikov a6994f8413 lib/bb/siggen.py: return a string from noop get_taskhash
OpenEmbedded is expecting to get a string from get_taskhash, but noop siggen
returns just 0 (number), so OE classes/sstate.bbclass barfs badly. Fix that.

(Bitbake rev: 24272dae15ccf641ece11ef5a6e2bfa3ebb6f5f9)

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-09-05 20:25:43 +01:00
Chris Larson 911e8bb56a siggen: don't choke with traceback when data is None
Given we use bb.error, not bb.fatal, here, it seems this was intended to be
non-fatal, yet we'd end up trying to concatenate None. Fix this by setting an
empty task to the empty string, for the purposes of hashing. Also str() the
value we get from the datastore, just in case something other than a string
was stored there.

(Bitbake rev: ec8a5a495b72e061a1e8d7c7449afb26581872c0)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-06-07 22:29:25 +01:00
Richard Purdie fe5f742865 build/siggen: Ensure a task signature file is generated for each task that is executed
Tracing down signature changes and dependencies is hard unless the complete task
chain can be evaultated. Since we have the data available at task exeuction
time, writing it to disk makes sense.

This change is suboptimal internal knowledge stamp_internal() has leaks into
make_stamp() and the concepts used by this code need revisiting but the change
brings enough usability benefit to warrant its inclusion despite that.

Addresses issue [YOCTO #1074]

(Bitbake rev: 139b8a625818225c358a1b8363518d7ed6913188)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-05-25 23:39:37 +01:00
Chris Larson af0163c2b6 bb.siggen: import os
(Bitbake rev: cd274f653c677daa69b2e15ffed803b7b1d25a43)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-31 12:21:55 +01:00
Chris Larson 05c4692320 siggen: add bb.data, bb.parse imports
(Bitbake rev: 8eafb12208fcd073f930c0c74f25831d02c02198)

Signed-off-by: Chris Larson <chris_larson@mentor.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-02-21 13:49:56 +00:00
Kevin Tian bcb1873836 siggen.py: better print for task hash comparison
current bitbake-diffsigs simply print out the whole 'runtaskdeps' when there's mismatch, which
is not very readable. On the other hand, 'runtaskhashes' comparison is broken which assumes
same key existing in two sides. This commit provides better output by figuring out differences
from addition, removal or hash change.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2011-01-21 01:36:17 -08:00
Dongxiao Xu 80cf3e405c bitbake: Introduce stamp-extra-info task flag into stamp filenames
For certain tasks, we need additional information in build stamp file
other than the task name and file name. stamp-extra-info is introduced as
a task flag which is appended to the stamp file name.

[Code simplifcations/tweaks from Richard]

Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-18 12:50:04 +00:00
Richard Purdie 25b3d39612 bitbake/siggen.py: Fix whitelisted variable handling
Even when a variable was whitelisted, any dependencies of that variable
could still creep into the task hash due to the way the whitelisting
code worked. This patch changes thing to ensure that when whitelisted,
that whitelisting applies to the variable and any dependencies it has.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-12 15:58:48 +00:00
Richard Purdie 97789a160a bitbake/siggen.py: Add a signature generator which adds the hash to the stamp files
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-07 11:04:38 +00:00
Richard Purdie 66c6200ff3 bitbake build/siggen/runqueue: Fix stampfile parameters
The current parameters are not useful to the stampfile generator function
as they can't uniquely define a task. This updated things so the
parameters can identify unique tasks.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-06 19:47:03 +00:00
Richard Purdie 0090a798eb bitbake: Sync a load of whitespace and other non-functionality changes with bitbake uptream
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2011-01-04 14:46:54 +00:00
Kevin Tian 834f0c5a8d siggen.py: print taskname when seeing mismatched hash in cache
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-20 14:50:22 +00:00
Richard Purdie 1f3e313fd5 bitbake Revert bitbake exec() and go back to fork() for performace wins (first draft)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-17 18:25:06 +00:00
Kevin Tian aa1a780d84 siggen.py: make sure stamp directory existing
or else "bitbake -S" from scratch may report "No such file or directory" error.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-16 15:33:44 +00:00
Kevin Tian 4336d676d4 siggen.py: fix the wrong usage on BB_TASKHASH_WHITELIST
BB_TASKHASH_WHITELIST is expected to filter out native tasks from the
dependency list for target recipe's checksum. However current code
actually implements the opposite. All native sstate packages end up
to have empty task dependency while target sstate packages still have
native tasks counted into the checksum.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-07 12:45:08 +00:00
Kevin Tian ccd590bf9d siggen.py: set 'runtaskdeps' correctly
Now 'runtaskdeps' is assigned before taskhash whitelist is filtered out, and thus
always contains original task dependencies. This causes problem to diagnose sstate
related problem. So fix it by appending filtered dep to 'runtaskdeps' in the fly.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-12-06 01:15:39 +00:00
Kevin Tian eaa188f3b9 siggen.py: fix comparison around runtaskdeps
two dep lists should be sorted before the comparison, or else it just
causes false-positive confusion.

Also fix 'taskdeps' to 'runtaskdeps' when printing out the difference.

Signed-off-by: Kevin Tian <kevin.tian@intel.com>
2010-11-15 23:04:06 +00:00
Richard Purdie a59935fb3a bitbake/siggen: Allow siggen code to control final stampfile format
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-06 12:20:33 +00:00
Richard Purdie 88f6f3fadf bitbake/siggen: Provide better warnings about empty tasks
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-02 13:17:06 +00:00
Richard Purdie dc13a6197f bitbake/siggen: Fix finalise call arguments
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-11-01 10:23:09 +00:00
Richard Purdie 1d52fa5269 bitbake/bitbake-sigdiff: Extend to handle dumping single state siginfo files
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-30 18:02:35 +01:00
Richard Purdie 1c91f32f5e bitbake/siggen: Fix issue where excluded dependencies caused exceptions
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-30 18:02:35 +01:00
Richard Purdie 9747616600 bitbake/siggen: Ensure full signature data is not held unless needed, reducing memory consumption
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-29 10:47:17 +01:00
Richard Purdie ec4d6b989a bitbake: Pass task hash information to subprocesses
Pass task has informaiton to work processes, allowing full manipulation of
the hash data in the task context allowing checksums to be usable.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-28 15:34:27 +01:00
Richard Purdie 19d9435a32 bitbake/siggen: Allow generation of siggen data from task context
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-13 15:40:31 +01:00
Richard Purdie d94f0f74c1 bitbake/siggen.py: Improve debugging of checksums
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-13 12:17:33 +01:00
Richard Purdie 8d764de25f bitbake: Add missing signature files
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-09-03 16:11:45 +01:00