summaryrefslogtreecommitdiffstats
path: root/bitbake/bin/bitbake-diffsigs
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: bitbake: Drop duplicate license boilerplace textRichard Purdie2019-05-041-12/+0
| | | | | | | | | | With the introduction of SPDX-License-Identifier headers, we don't need a ton of header boilerplate in every file. Simplify the files and rely on the top level for the full licence text. (Bitbake rev: 695d84397b68cc003186e22f395caa378b06bc75) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Add initial pass of SPDX license headers to source codeRichard Purdie2019-05-041-0/+2
| | | | | | | | | | | | | | | | | This adds the SPDX-License-Identifier license headers to the majority of our source files to make it clearer exactly which license files are under. The bulk of the files are under GPL v2.0 with one found to be under V2.0 or later, some under MIT and some have dual license. There are some files which are potentially harder to classify where we've imported upstream code and those can be handled specifically in later commits. The COPYING file is replaced with LICENSE.X files which contain the full license texts. (Bitbake rev: ff237c33337f4da2ca06c3a2c49699bc26608a6b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: Use 4 spaces as indent for recursecbRobert Yang2019-04-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | It used 2 spaces as indent which wasn't clear enough, and might cause confusions, people might think it was in wrong format. Fixed: $ bitbake bc-native -ccleansstate -Snone $ bitbake bc-native -ccleansstate -Snone $ bitbake-diffsigs tmp/stamps/x86_64-linux/bc-native/1.07.1-r0.do_cleansstate.sigdata.* * Before: Hash for dependent task bc/bc_1.07.1.bb.do_clean:virtual:native changed from [foo] Taint (by forced/invalidated task) changed from [foo] Taint (by forced/invalidated task) changed from [foo] * Now Hash for dependent task bc/bc_1.07.1.bb.do_clean:virtual:native changed from [foo] Taint (by forced/invalidated task) changed from [foo] Taint (by forced/invalidated task) changed from [foo] (Bitbake rev: 5127a8d8e6d53f5f43a6ada7fd09b6b0c24ae989) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: Support recursive deps with signature filesPeter Kjellerstedt2019-01-031-1/+3
| | | | | | | | | | | Follow dependent hash changes recursively also when specifying two signature files explicitly. Previously this was only done when using the --task option. (Bitbake rev: 353f0f3c77c3cdd75c1be2a565234a5e53dba3ef) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: Merge with bitbake-dumpsigPeter Kjellerstedt2019-01-031-58/+81
| | | | | | | | | | | | | | | | | The functionalities of bitbake-diffsigs and bitbake-dumpsig are so similar that they can be merged into one. Add an option --dump to make bitbake-diffsigs dump the last signature data instead of comparing it. Keep bitbake-dumpsig as a symbolic link to bitbake-diffsigs. When it is called as bitbake-dumpsig, it behaves as if --dump was specified. Also make -D the short option for --debug again (the way it used to be, and still was for bitbake-dumpsig), so that -d can be used as the short option for --dump. (Bitbake rev: 3635b829e4eb940ada2b52bfb5b5e5be93a3b0aa) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: fix regression after recent server changesPaul Eggleton2017-07-271-7/+28
| | | | | | | | | | | | | | | | | | We were bridging the gap between the server and UI here by calling a bb.siggen.find_siginfo, a function defined and set on that module from the metadata. This worked from the UI side before but since the recent server changes is no longer accessible. Create a new command so this can execute on the server side and return the result by way of a new event. (We're still running compare_sigfiles() on the signature generator but that isn't quite the same thing and does still work.) Fixes [YOCTO #11844]. (Bitbake rev: fdcea991baa4f83d9c98d468d7b49c8c388a4a15) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: fix traceback with no argumentsPaul Eggleton2017-04-111-0/+4
| | | | | | | | | | | | In the move over to argparse we've made the two signature file arguments optional and thus if -t is not in use we need to explicitly check if at least one signature file has been specified - and if not, show an error and the command-line help. (Bitbake rev: 9011366689b26305281fcb2d412dcacece917e18) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: colourise outputPaul Eggleton2017-04-101-6/+12
| | | | | | | | | | | | | | | | | | If the output is a TTY, add colour to the output in order to make it easier to read. At the moment this is fairly basic, just add colour to the "titles" of each change and to the diff output. I tried to introduce this without changing the code too much - rather than moving everything over to the new python formatting style, I've introduced a color_format() function which takes care of the colour formatting, either accepting additional format arguments or alternatively leaving the caller to use the old-style formatting (%) to insert values. (Bitbake rev: 04a023c8fdea1e1812fcdcaf00345aab59f9abe1) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: add an option to find and compare specific signaturesPaul Eggleton2017-04-101-36/+59
| | | | | | | | | | | | | | | With the -t option which recurses to find the ultimate cause of a signature change, it was hardcoded to take the last two executions of the specified task. On the other hand, if you have two specific task hashes (say from bitbake output, or some other tool) then you'll want to pick those, so provide an option to specify those as well. (Note, the new -s option needs to be specified alongside -t rather than instead of it.) (Bitbake rev: d9813b1a4223cf8dc80cab90e467ddf4bf8d1078) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: change to use argparsePaul Eggleton2017-04-101-31/+33
| | | | | | | | | | Argparse is a bit easier to deal with than optparse, and since we're about to add some options, migrate this script over. (Bitbake rev: 7f130e0b5ce6cfc6b35176465f260092cd3b3d64) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/siggen: show a diff when dumping changes to multi-line valuesPaul Eggleton2017-04-101-1/+3
| | | | | | | | | | | | | | | | | | When dumping changes to signatures e.g. output of bitbake -s printdiff, if for example a function has changed, it's much more readable to see a unified diff of the changes rather than just printing the old function followed by the new function, so use difflib to do that. Note: I elected to keep to one item in the returned list per change, rather than one line per line of output, so that the caller can still look at changes individually if needed. Thus I've added some handling to bitbake-diffsigs to split the change into lines so that each line is displayed indented. (Bitbake rev: 4d254ae63a35231c98e3f73f669b040ed1144042) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: drop naive logic for removing duplicate filesPaul Eggleton2017-04-101-16/+0
| | | | | | | | | | | | | | | This logic doesn't work in practice, certainly not with current versions where sigdata files are preserved in the stamps directory and therefore there will often be multiple sigdata files - you can now easily get files for the same signature from sstate and the stamps directory with the result that bitbake-diffsigs reports nothing has changed. Instead, let's change the find_siginfo function in OE-Core to simply not return duplicates so we don't have to filter them out here. (Bitbake rev: f0d7ab259d8ef95643e7229474b7850608aa4426) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: properly report which signature is missingPaul Eggleton2017-04-101-3/+7
| | | | | | | | | | If just one of the two signatures we want to compare aren't available, report that one rather than misleadingly claiming both are missing. (Bitbake rev: c87764b9147792a10efad3ed5378f36f0a055bc6) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: fix -t picking wrong files to comparePaul Eggleton2017-04-101-3/+3
| | | | | | | | | | | We weren't picking the right files to compare here - according to the order in which the list is sorted (by mtime), we need to be taking the last two items and not the first two. (Bitbake rev: 99f49b56115b1f8d1a0a0b911da62ffd1f997b5f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/msg: introduce logger_create() functionPaul Eggleton2017-03-271-12/+2
| | | | | | | | | | | We use this code to set up a logger with colour in a number of different places, so create one function that does this and make some of bitbake's utility scripts use it. (Bitbake rev: b1ba7d1cc8ec33e2d081230287abd07f52136097) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: Add debug supportPeter Kjellerstedt2017-03-231-0/+9
| | | | | | | | | Currently shows the name of the signature files that were found when --task is used. (Bitbake rev: 751b06c25d22eea8240f9429cb49874082245e52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs/bitbake-layers: Ensure tinfoil is shut down correctlyPaul Eggleton2016-09-021-3/+3
| | | | | | | | | | | We should always shut down tinfoil when we're finished with it, either by explicitly calling the shutdown() method or by using it as a context manager ("with ..."). (Bitbake rev: 131e6dc4bbd197774d35d2b266bfb0816f6e6b1e) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake: Convert to python 3Richard Purdie2016-06-021-2/+2
| | | | | | | | | Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. (Bitbake rev: d0f904d407f57998419bd9c305ce53e5eaa36b24) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bin, toaster: Fix print and exception syntaxRichard Purdie2016-05-111-3/+3
| | | | | | | | | This updates the print "" syntax to print() and fixes some exception handling syntax such that its compatible with python v2 and v3. (Bitbake rev: 58304fcce9727fd89564436771356c033ecd22a3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: consider the situation where sigdata and siginfo ↵Chen Qi2015-04-171-1/+17
| | | | | | | | | | | | | | | | | | files having the same hash values For now, `bitbake-diffsigs -t <recipe> <task>' doesn't work. It always outputs nothing. The problem is that bitbake-diffsigs are comparing sigdata and siginfo files that have the same hash value. This is not what we want. These two files are actually duplicates considering the purpose of bitbake-diffsigs. So we need to remove one of them so that bitbake-diffsigs could actually compare the correct signature files. (Bitbake rev: c34613eb69fd19770cbfc78ab8384221f10d5587) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: Fix runtime error when no arguments are givenJacob Kroon2014-04-271-2/+2
| | | | | | | | | | | | | | | | If bitbake-diffsigs is run without arguments it will error: Traceback (most recent call last): File "./bin/bitbake-diffsigs", line 121, in <module> if output: NameError: name 'output' is not defined Fix this by moving the check for output into the inner else-clause. (Bitbake rev: 7d3545a66863ad7183a7650b2af57eee091c45ae) Signed-off-by: Jacob Kroon <jacob.kroon@mikrodidakt.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: improve error handlingPaul Eggleton2013-10-071-5/+25
| | | | | | | | | | * Set up a logger independent of BitBake so we can log errors ourselves * Handle common errors without printing a traceback (Bitbake rev: 77b5f5b8dca4deebb06eeb06a8e7f2ccdbfff46f) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: refactor argument parsing slightlyPaul Eggleton2013-10-071-16/+13
| | | | | | | | | | | * Use OptionParser to parse the two options to -t rather than trying to pick them out ourselves. * Add a description shown with --help output (Bitbake rev: daab42d19463b4108968fc88b207936e5ac84154) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: handle if task name is specified without do_ prefixPaul Eggleton2013-10-071-0/+3
| | | | | | | | | | | Adjust the task name automatically if the -t option is specified with a task name that doesn't start with do_ (e.g. "configure" instead of "do_configure"). (Bitbake rev: d182cbc63745303ef2dc9fa2cbbf5d87a68e0b52) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffigs: Don't pull in tinfoil unless we really need/plan ↵Richard Purdie2013-01-251-1/+1
| | | | | | | | | | | to use it This means we can run in parallel with other bitbake processed we're not in task mode. (Bitbake rev: 20222f2f16130e91eed5e68286188ee0e8f8f3bf) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-diffsigs: allow specifying task & follow deps recursivelyPaul Eggleton2012-09-071-5/+92
| | | | | | | | | | | | | | | Add the ability to compare the two most recent runs of a specified task, and follow dependent hash changes recursively. This enables you to trace back and find exactly why a task was re-run after the fact. Note that this relies on the metadata providing a function, hooked in as bb.siggen.find_siginfo, which allows searching in the appropriate places to find signature data files. (Bitbake rev: cc70181659c07e04c205e17832846acf1ff31d28) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/siggen.py: make signature dump/compare functions return a listPaul Eggleton2012-09-071-2/+5
| | | | | | | | | | These functions become a little bit more reusable if they return a list containing the output rather than just printing it. (Bitbake rev: a0ad2a947b71abcc0a1244cf139b9e9dfd8ee049) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/bitbake-sigdiff: Extend to handle dumping single state siginfo filesRichard Purdie2010-09-301-1/+4
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Add missing signature filesRichard Purdie2010-09-031-0/+9
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>