aboutsummaryrefslogtreecommitdiffstats
path: root/rrs/tools/upgrade_history_internal.py
AgeCommit message (Collapse)Author
2018-05-04rrs_upgrade_history: improve checkout logicPaul Eggleton
* Consolidate the code for checking out a repository, using the newly added utils.checkout_repo() function * Check out a layer's dependencies, not just the layer itself * Only check out if the desired revision isn't already checked out (mostly useful for bitbake which we would otherwise be checking out much more frequently than necessary since it may not have changed even if we've moved to a new commit in the layer). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04rrs_upgrade_history: handle only .inc file changingPaul Eggleton
If a recipe upgrade only consists of a .inc file changing, we were not picking it up, since we were only looking specifically for recipes (.bb). If a .inc file changes, assume all .bb files in the same directory (if any) should be parsed to look for an upgrade. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04rrs/tools: ensure recipe parsing code deletes temporary dirPaul Eggleton
load_recipes() was leaving files around in /tmp; on my Fedora system this eventually resulted in /tmp running out of space which we do not want. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04rrs_upgrade_history: ignore files outside of the layerPaul Eggleton
We were parsing recipes that were in the repository but not inside the actual layer we're dealing with (e.g. we have meta-selftest within the OE-Core repository, containing a number of recipes that are only intended for testing purposes and should not be looked at by this script). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04rrs_upgrade_history: show text of any exception that blocks parsingPaul Eggleton
If an exception occurs during parsing, let's actually see what kind of exception it was in the output. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04rrs_upgrade_history: handle broken version numbersPaul Eggleton
In OE-Core revision e0531174119bff21e9014b95ed1bbd0e1c01af26 we accidentally committed a new e2fsprogs recipe with ..bb at the end of its name instead of .bb. This was fixed immediately afterwards, but when the RRS hits this commit, it doesn't fail immediately, but the bogus version "1.43." gets into the database and all subsequent commits touching the e2fsprogs recipe cause bb.utils.vercmp_part() to blow up because one of the version parts in the "previous" version in the database is apparently empty. To work around this and any similar issues, just reject any change that results in such a broken version string (on the assumption that it'll be corrected in a subsequent commit and thus we will get to re-parse the recipe then and therefore not miss the upgrade.) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04rrs_upgrade_history: handle multiple recipes with same pn per layerPaul Eggleton
We should expect multiple matches for layerbranch + pn, so use filter() instead of get() and take the first id that matches. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04rrs_upgrade_history.py: ensure we shut down tinfoil safelyPaul Eggleton
Use try...finally to ensure we shut down tinfoil, but since we are potentially dealing with older bitbake releases when importing older upgrades, only call shutdown() if it's actually there (and although it's unlikely, guard against the broken shutdown() in fido as we do in the main layer index update script). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2018-05-04rrs_upgrade_history.py: enable to work across python2/3 versionsPaul Eggleton
If you want to go back and get history for the earlier releases (krogoth and previous) then we need to be able to support both python 2 and 3, which practically means we need the same split for this script as we have for the main layer index update script. The catch here is that since we are going back and following the history of changes forward, we basically need to use the same version of bitbake that was current at that time. This works except for around the transition between python 2 to 3 where the metadata lagged behind a bit, so we need to take that into account. In order to keep things generic we have a date field on the maintenance plan layer branch that specifies the date in the metadata where we should switch over to python 3, and then link to PythonEnvironment records that should be used for python 2 and 3 respectively. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>