aboutsummaryrefslogtreecommitdiffstats
path: root/lib/layerindexlib
AgeCommit message (Collapse)Author
2021-02-10logging: Make bitbake logger compatible with python loggerJoshua Watt
The bitbake logger overrode the definition of the debug() logging call to include a debug level, but this causes problems with code that may be using standard python logging, since the extra argument is interpreted differently. Instead, change the bitbake loggers debug() call to match the python logger call and add a debug2() and debug3() API to replace calls that were logging to a different debug level. [RP: Small fix to ensure bb.debug calls bbdebug()] Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-08-25lib: fix most undefined code picked up by pylintFrazer Clews
Correctly import, and inherit functions, and variables. Also fix some typos and remove some Python 2 code that isn't recognised. Signed-off-by: Frazer Clews <frazerleslieclews@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-03-23data_smart: Don't pass unneeded datastoreRichard Purdie
The datastore is already available to this function internally so don't also try and pass the datastore as a parameter. This is clearly broken API when you look at the existing calls to it. This then doesn't break the planned tinfoil data connector changes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2020-01-19lib: remove unused importsFrazer Clews
removed unused imports which made the code harder to read, and slightly but less efficient Signed-off-by: Frazer Clews <frazer.clews@codethink.co.uk> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-08-13layerindexlib: Fix parsing of recursive layer dependenciesMark Hatle
[YOCTO #13447] When running bitbake-layers layerindex-fetch from 'master', there is a circular dependency between meta-oe and meta-python. This triggered a maximum recursion depth exception. To fix the exception, as we walk down a branch (depth first search), we track the layers we've already seen. If we are about to recurse into a layer we've already seen we report a warning and then stop recursion. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-04bitbake: Drop duplicate license boilerplace textRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-04bitbake: Add initial pass of SPDX license headers to source codeRichard Purdie
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. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-10-17layerindexlib: Fix various type checking errorsMark Hatle
In the list_obj function, we can't check if the requested object is 'in', the index data -- as it's actually an attribute of the object. Move to hasattr. The remaining items were incorrect usages of 'type' for class type comparison. Instead move to 'isinstance'. Remaing 'type' comparisons are still valid. The code was also reordered slightly to avoid a lot of: if not isinstance(x, y): ... else: ... reordering it removes the not and makes the code slightly easier to read. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-25lib/layerindexlib/tests/restapi.py: Fix test cases when BB_SKIP_NETTETS=yesMark Hatle
Change the way the network related tests are skipped, based on how the fetch tests are handled. We introduce a 'skipIfNoNetwork()' function that will report skipped tests through the standard unit test reporting system. [YOCTO #12928] Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-25lib/layerindexlib/tests/cooker.py: Fix topdir to use an absolute (real) pathMark Hatle
The test case needs to access test case files. Different versions of python may return absolute or relative locations in __file__. Use the same approach as other test cases in determining the location of the test files. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-01layerindexlib: Initial layer index processing module implementationMark Hatle
The layer index module is expected to be used by various parts of the system in order to access a layerindex-web (such as layers.openembedded.org) and perform basic processing on the information, such as dependency scanning. Along with the layerindex implementation are associated tests. The tests properly honor BB_SKIP_NETTESTS='yes' to prevent test failures. Tests Implemented: - Branch, LayerItem, LayerBranch, LayerDependency, Recipe, Machine and Distro objects - LayerIndex setup using the layers.openembedded.org restapi - LayerIndex storing and retrieving from a file - LayerIndex verify dependency resolution ordering - LayerIndex setup using simulated cooker data Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>