aboutsummaryrefslogtreecommitdiffstats
path: root/layerindex/update.py
AgeCommit message (Collapse)Author
2013-08-11update.py: preserve recipe id when updatingPaul Eggleton
The recipe detail pages use the recipe record id, so in case users bookmark links to these pages, try to preserve the id when a recipe upgrade occurs (which usually shows up as a delete and an add). This also works when doing a full update with -r so that we can capture the newly recorded items (bbclasses, bbappends) without having all the recipe id values change. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-07-28Split out recipe parsing and utility functions to a separate modulePaul Eggleton
To allow re-use outside of the update script, split out parsing setup code to a new recipeparse module. Also split out runcmd, get_layer, get_branch and logger_create functions to a separate utils module. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-17Add actual_branch field to layerbranchPaul Eggleton
Some layers don't use the conventional branch name (i.e. the same name as the core branch). Add a field so we can record the actual branch name and use this within the update script. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-17Collect bbappends and bbclasses for each layerPaul Eggleton
Collect bbappend/bbclass info during the update process and display it on the layer detail page. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-06-03Collect BUGTRACKER, PROVIDES and BBCLASSEXTEND for each recipePaul Eggleton
* Show BUGTRACKER in the recipe detail page if set * Track the other two variables for possible future use Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-22update.py: add --nocheckout optionPaul Eggleton
This allows disabling the checkout of the appropriate branch so that we can test the update script with fixes to bitbake or the metadata if needed. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-22update.py: handle change to cooker structure in newer BitBakePaul Eggleton
The cooker module has been refactored in BitBake master and this moved and renamed the _parse() function; change the update script to handle that (whilst still handling older versions). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-08update.py: improve fetch failure handlingPaul Eggleton
* Report layer which failed to fetch in error message * Don't retry fetching a repo if it already failed for another layer (where more than one layer is in the same repository) * Exit immediately if all fetches failed Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-05-08update.py: error out with unexpected argumentsPaul Eggleton
It's easy to forget you need to use -l to specify the list of layers to update and previously we just ignored unused arguments, so check for them and error out if present. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20update.py: fix scanning for machine filesPaul Eggleton
* Avoid picking up machine files in sub-layers * Skip scanning of .git directory when doing full refresh Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20update.py: improve handling of machine descriptionsPaul Eggleton
Fall back to NAME if DESCRIPTION is not specified and remove more preamble from the string. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20update.py: set log level earlierPaul Eggleton
Ensure that we're not printing info messages when the -q option is specified. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20update.py: make failure to parse a recipe an errorPaul Eggleton
Ensure that these are still printed when the -q option is used. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20update.py: set PN for recipe even if we fail to parse itPaul Eggleton
This ensures recipes that failed to parse sort properly instead of all appearing at the start of the search results. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20update.py: ensure TMPDIR gets created before starting parsePaul Eggleton
We don't go through the normal code path where this directory would be created, and if it doesn't exist an error will be thrown in insane.bbclass when any QA issue is logged; so create it manually. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20update.py: explicitly check for existence of conf/layer.confPaul Eggleton
Rather than letting BitBake error out, just check for existence of this file and print a single error line if it doesn't exist. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20Move fetch dir calculation to modelPaul Eggleton
This makes it easier to get this directory name outside of the update script. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20update.py: create dependency/maintainer records when creating LayerBranchPaul Eggleton
If we're creating a LayerBranch record, it's helpful to copy the maintainer and dependency records in from master as they're usually going to be the same; if they're not the user can always change them afterwards. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-20Move repo subdirectory to layerbranchPaul Eggleton
So it turns out that one or two layers have changed in structure between branches, so we need to be able to specify this on a per-branch basis. Good times... Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06update.py: ensure script can be run from any directoryPaul Eggleton
Don't assume the current directory contains our conf/local.conf, explicitly use the directory above where the script is located. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-06update.py: avoid writing bitbake.lock/cache to current directoryPaul Eggleton
Create a temporary directory for these files. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-03-05Add support for handling multiple branchesPaul Eggleton
Change the data structure to support multiple branches. At the top level there is a set list of Branch objects, and then a LayerBranch object between each layer and the maintainers, dependencies, recipes and machines, so that the set of each can be different per branch. The branch is a session option, and can be selected via a drop-down that is shown for all pages. Additionally, with this change we avoid the need to run the update script within a build environment set up with oe-init-build-env - since we need a specific version of BitBake per branch we now use our own copy of BitBake which is fetched by the script itself. The update script will need to be called multiple times however - once per branch. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26Use top commit for subdirectory instead of repository in update scriptPaul Eggleton
If there is more than one layer in a repository, we want the latest commit in the subdirectory not the entire repository (since we use it to determine the last commit date which should show how "fresh" the layer is). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26Handle updating of inc files/classes within same layerPaul Eggleton
If we aren't doing a full refresh, when changes to an included/required file or an inherited class occur we need to update all of the files that depend on them. BitBake records these dependencies, so read them and record them against each recipe. At the moment this only handles dependencies within the same layer; that is probably sufficient to handle most changes for the purposes of extracting the data this application cares about. A future improved solution will probably involve making use of BitBake's cache rather than and parsing all layers and their dependencies rather than individual recipes. This change also adds -x/--nofetch and -n/--dry-run options for debugging as well as some further debug messages. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-26Don't stop parsing layer on fatal error in update scriptPaul Eggleton
"Fatal" errors during parsing a single recipe (such as finding legacy staging) shouldn't stop us from parsing the rest of the layer. To do this we need to catch BaseException instead of Exception as fatal errors end up calling sys.exit. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-25Fix update script to handle layers which include/inherit files from other layersPaul Eggleton
Parse layer.conf files so that BBPATH is set correctly as well as any other custom variables. This required the repository fetching to be split out of the update process and done first so that we're sure we have the data for the other layers. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-24Collect machine information from layersPaul Eggleton
Look for conf/machine/*.conf and add a record for each file found. These are displayed in the layer detail page if any are present. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-24Add ability to update specific layers by namePaul Eggleton
Add a -l / --layers option to the update script. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-24Fix update script to handle includes from other directoriesPaul Eggleton
Set BBPATH so that files from the layer can be found when recipes use include/require pointing to files with a specific path, or use inherit to inherit a class in the layer. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-24Don't fail with an error due to unset LICENSEPaul Eggleton
meta-ti has a recipe in it that causes parsing to fail with a fatal error due to LICENSE not being set; for the purposes of the layer index just set a default value for LICENSE so that this doesn't break parsing. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-18Clear default value of DESCRIPTION before parsing recipesPaul Eggleton
By default, if DESCRIPTION is not set it takes the value of SUMMARY. However, within this tool it is useful for us to be able to tell when DESCRIPTION has not been set so we want it to be blank if that is the case. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-18Clear default value of HOMEPAGE before parsing recipesPaul Eggleton
The default value of HOMEPAGE ('unknown', set from bitbake.conf) is not particularly helpful - we want it to be blank if it's not set, so just set it to blank before parsing each recipe. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2013-02-13Initial commit of layerindex-webPaul Eggleton
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>