summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-09-06lib/bb/utils: edit_metadata() comment tweakspaule/bb-npm-fixes3Paul Eggleton
No functional changes, just make a couple of minor tweaks to the comments for edit_metadata(): * There are four elements to be returned by the callback function * Add an example return statement for when you don't want to modify the value Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-06fetch2/npm: clarify commentPaul Eggleton
The correct name of the parameter is "version" not "ver" so ensure we aren't misleading the user by giving the latter in an example. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-06fetch2/npm: handle top-level shrinkwrap filePaul Eggleton
Allow using a top-level shrinkwrap file with one or more npm:// dependencies, i.e. if the module isn't found at the top level then look one level down. Part of the fix for [YOCTO #9537]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-06fetch2/npm: support subdir= parameterPaul Eggleton
"npmpkg" can be a default, but it should respect the subdir parameter as with other FetchMethods. This allows us to have more than one npm:// entry in SRC_URI without nasty hacks. Fix required in order to support [YOCTO #9537]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-06fetch2/npm: fix broken fetches if more than one npm URL fetchedPaul Eggleton
You cannot set a URL-specific value in an object-level variable on the FetchMethod in urldata_init() or the result is the value specific to the last URL will be the one that gets set. This prevented fetching more than one npm:// URL correctly - the other tarballs would not download to the correct location and do_unpack failed to find them as a result. Fix required in order to support [YOCTO #9537]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-06fetch2/npm: explicitly specify workdirPaul Eggleton
We were downloading into the current directory here, which is fine if that current directory can be expected to be the right place - but that's not true when called from recipetool within OE. We should explicitly specify the directory to run the command in and then there won't be a problem. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-02bb.fetch2.svn: correctly pass workdir when fetchingChristopher Larson
The ud.pkgdir argument was being passed as the 'quiet' argument to runfetchcmd, not the 'workdir' argument, resulting in fetching the svn module into the root of DL_DIR, not where it belongs. Cc: Matt Madison <matt@madison.systems> Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02cooker.py: Catch when stdout doesn't have a file descriptorMariano Lopez
Currently, there is a check to remove the TOSTOP attribute from a tty to avoid hangs. It assumes that sys.stdout will have a file descriptor and this is not always true, some IO classes will throw exceptions when trying to get its file descriptor. This will add a check for such cases and avoid throwing an exception. [YOCTO #10162] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02toaster: localhostbecontroller Remove git assumptionMichael Wood
We don't need to force everyone to use git for the method in which openembedded-core is downloaded. For instance it could have been downloaded and extracted as a tarball. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02toaster: Allow git information to be null for BRLayerMichael Wood
We no longer only deal with layers that have their source in a gir repository, we also allow for local directories too so update the BRLayer model to reflect this. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02toaster: tests Add selenium test layer source switching layer details pageMichael Wood
Add selenium tests for the new layer source switching functionality on the layer details page. Edits the values for git repository and saves and then edits the details for directory information and saves. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02toaster: Move Custom image recipe rest api to api fileMichael Wood
We now have a dedicated file for the rest API so move and rework for class based views. Also clean up all flake8 identified warnings. Remove unused imports from toastergui views. The original work for this API was done by Elliot Smith, Ed Bartosh, Michael Wood and Dave Lerner Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02toaster: Fix oe-core fixtureMichael Wood
Due to a copy paste error we managed to get some of the wrong information in the oe fixture that provides a suggested default settings for Toaster. This meant it tested correctly when it shouldn't have. Fix: - The use of local bitbake - An incorrect call to realpath which didn't include its parent module. - The field used for the local_dir of an existing openembedded-core Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02toaster: layerdetails clean ups after integrating local layer changesMichael Wood
A few clean ups for the work done to integrate editing imported local layers into the layer detail page. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02toaster: update api to include local_source_dirSujith H
Add an additional argument to the api to handle local_source_dir which is the value user passes to import non-git layers. [YOCTO #9913] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02toaster: layerdetails js changes for switching layersSujith H
This patch helps to implement the switching of layers between directories and git repositories. Specifically selection of git and local directory. Also enabling form to view the selection. [YOCTO #9913] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02toaster: add switch of git and not-git layers importedSujith H
This patch updates the layerdetails html file to add the feature of switching imported layers between directories and git repositories. [YOCTO #9913] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02buildinfohelper: discover kernel artifacts correctlyElliot Smith
Because some image_license.manifest files contain multiple FILES lines, and because those lines can sometimes not contain a list of files (i.e. they look like "FILES:\n"), we were resetting the list of kernel artifacts when we hit the second "empty" line. Fix by ignoring any FILES line which doesn't list files, and by appending any files found in a valid FILES line, rather than overwriting the existing list. [YOCTO #10107] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02wget: allow basic http auth for SSTATE_MIRRORSStephano Cetola
If http basic auth creds were added to sstate mirrors like so: https://foo.com/sstate/PATH;user=foo:bar;downloadfilename=PATH The sstate mirror check would silently fail with 401 unauthorized. This patch allows both the check, and the wget download to succeed by checking for user credentials and if present adding the correct headers, or wget params as needed. [ YOCTO #9815 ] Signed-off-by: Stephano Cetola <stephano.cetola@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02cookerdata/ast: Fail gracefully if event handler function is not foundMarkus Lehtonen
[YOCTO #10186] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02build/runqueue: Add noextra stamp file parameter to fix multiconfig buildsRichard Purdie
We can't execute the same task for the same package_arch multiple times as the current setup has conflicting directories. Since these would usually have the same stamp/hash, we want to execute in sequence rather than in parallel, so for the purposes of task execution, don't consider the "extra-info" on the stamp files. We need to add a parameter to the stamp function to achieve this. This avoids multiple update-rc.d populate_sysroot tasks executing in parallel and breaking multiconfig builds. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02fetch2: Handle multiconfig fetcher issuesRichard Purdie
We need a separate fetcher cache per multiconfig as the revisions and other SRC_URI data can potentially be different. For now, this is the simplest way to achieve that and avoids linux-yocto kernel build failures when targeting multiple machines for example. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-02tinfoil: add a parse_recipe_file functionPaul Eggleton
Parsing a recipe is such a common task for tinfoil-using scripts, and is a little awkward to do properly, so add an API function to do it. This should also isolate scripts a little from future changes to the internal code. The first user of this will be the OpenEmbedded layer index update script. Part of the fix for [YOCTO #10192]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-02cache: allow parsing a recipe with a custom config datastorePaul Eggleton
To accommodate the OpenEmbedded layer index recipe parsing, we have to have the ability to pass in a custom config datastore since it constructs a synthetic one. To make this possible after the multi-config changes, rename the internal _load_bbfile() function to parse_recipe(), make it a function at the module level (since it doesn't actually need to access any members of the class or instance) and move setting __BBMULTICONFIG inside it since other code will expect that to be set. Part of the fix for [YOCTO #10192]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-02bitbake-diffsigs/bitbake-layers: Ensure tinfoil is shut down correctlyPaul Eggleton
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 ..."). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-02tinfoil: add context manager functionsPaul Eggleton
Since calling the shutdown() function is highly recommended, make tinfoil objects a little easier to deal with by adding context manager support - so you can do the following: with bb.tinfoil.Tinfoil() as tinfoil: tinfoil.prepare(True) ... Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-09-02bitbake-user-manual: Added "Exporting Variables to the Environment"Scott Rifenbark
Fixes [YOCTO #10196] Added a new section named "Exporting Variables to the Environment". This section provides a dedicated description for how to export variables to the shell. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2016-09-02bitbake-user-manual: Corrected misspelled STAMPS_DIRScott Rifenbark
Fixes [YOCTO #10141] Section on Checksums (Signatures) had this variable referred to as STAMP_DIR. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com>
2016-08-24fetch2: clean up remaining cwd saves/changesMatt Madison
Now that the fetchers all preserve the current working directory, the cwd changes in the try_mirror_url, download, and checkstatus methods are no longer needed. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-20siggen: Fix file variable typo in compare_sigfilesJonathan Liu
Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19fetch2: preserve current working directoryMatt Madison
Fix the methods in all fetchers so they don't change the current working directory of the calling process, which could lead to "changed cwd" warnings from bitbake. Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19dump_cache.py: use python3 as interpreterRobert Yang
Fixed: File "bitbake/contrib/dump_cache.py", line 39 print("Error, need one argument!", file=sys.stderr) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19toasterui, knotty: don't print taskid followed by taskstring which are now ↵Martin Jansa
in most cases identical * unify the format how the task is described * don't show taskid followed by taskstring as the taskstring is different only for setscene tasks (by _setscene suffix) * the duplicated output was introduced by: 2c88afb taskdata/runqueue: Rewrite without use of ID indirection as reported and confirmed as a bug here: http://lists.openembedded.org/pipermail/openembedded-core/2016-June/123148.html * show: NOTE: Running task 541 of 548 (/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_package) instead of much longer: NOTE: Running task 541 of 548 (ID: /OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_package, /OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_package) and similarly for failed tasks: ERROR: Task (virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_install) failed with exit code '1' instead of much longer: ERROR: Task virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_install (virtual:native:/OE/build/oe-core/openembedded-core/meta/recipes-core/zlib/zlib_1.2.8.bb:do_install) failed with exit code '1' Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19tests: add unit tests for the usehead url parameterMarkus Lehtonen
[YOCTO #9351] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19git: Allow local repos to use HEADRichard Purdie
Introduce a new 'usehead' url parameter for git repositories. Specifying usehead=1 causes bitbake to use whatever commit the repository HEAD is pointing to. Usage of usehead=1 is only allowed for local git repositories, i.e. it must always be accompanied with protocol=file url parameter. [YOCTO #9351] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19bitbake-selftest: enable bitbake logging to stdoutMarkus Lehtonen
Now you get the bb logger output for failed tests. This helps debugging problems. Also, all stdout/stderr data for successful tests is silenced which makes for less cluttered console output. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19bitbake-selftest: introduce BB_TMPDIR_NOCLEANMarkus Lehtonen
Set this env variable to 'yes' to preserve temporary directories used by the fetcher tests. Useful for debugging tests. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19bitbake-selftest: add help text for env variable(s)Markus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19bitbake-selftest: utilize unittest.main betterMarkus Lehtonen
This simplifies the script, and, gives new features. It is now possible to run single test functions, for example. This is nice when writing new test cases. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-18bitbake: Update version to 1.31.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17bitbake: Initial multi-config supportRichard Purdie
This patch adds the notion of supporting multiple configurations within a single build. To enable it, set a line in local.conf like: BBMULTICONFIG = "configA configB configC" This would tell bitbake that before it parses the base configuration, it should load conf/configA.conf and so on for each different configuration. These would contain lines like: MACHINE = "A" or other variables which can be set which can be built in the same build directory (or change TMPDIR not to conflict). One downside I've already discovered is that if we want to inherit this file right at the start of parsing, the only place you can put the configurations is in "cwd", since BBPATH isn't constructed until the layers are parsed and therefore using it as a preconf file isn't possible unless its located there. Execution of these targets takes the form "bitbake multiconfig:configA:core-image-minimal core-image-sato" so similar to our virtclass approach for native/nativesdk/multilib using BBCLASSEXTEND. Implementation wise, the implication is that instead of tasks being uniquely referenced with "recipename/fn:task" it now needs to be "configuration:recipename:task". We already started using "virtual" filenames for recipes when we implemented BBCLASSEXTEND and this patch adds a new prefix to these, "multiconfig:<configname>:" and hence avoid changes to a large part of the codebase thanks to this. databuilder has an internal array of data stores and uses the right one depending on the supplied virtual filename. That trick allows us to use the existing parsing code including the multithreading mostly unchanged as well as most of the cache code. For recipecache, we end up with a dict of these accessed by multiconfig (mc). taskdata and runqueue can only cope with one recipecache so for taskdata, we pass in each recipecache and have it compute the result and end up with an array of taskdatas. We can only have one runqueue so there extensive changes there. This initial implementation has some drawbacks: a) There are no inter-multi-configuration dependencies as yet b) There are no sstate optimisations. This means if the build uses the same object twice in say two different TMPDIRs, it will either load from an existing sstate cache at the start or build it twice. We can then in due course look at ways in which it would only build it once and then reuse it. This will likely need significant changes to the way sstate currently works to make that possible. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17siggen: properly close files rather than opening them inlinePaul Eggleton
If you don't do this, with Python 3 you get a warning on exit under some circumstances. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17ast/ConfHandler: Add a syntax to clear variableJérémy Rosen
unset VAR will clear variable VAR unset VAR[flag] will clear flag "flag" from var VAR Signed-off-by: Jérémy Rosen <jeremy.rosen@openwide.fr> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17cache: Build datastores from databuilder objectRichard Purdie
Rather than passing in a datastore to build on top of, use the data builder object in the cache and base the parsed recipe from this. This turns things into proper objects building from one another rather than messy mixes of static and class functions. This sets things up so we can support parsing and building multiple configurations. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17cache: Split Cache() into a NoCache() parent objectRichard Purdie
There are some cases we want to parse recipes without any cache setup or involvement. Split out the standalone functions into a NoCache variant which the Cache is based upon, setting the scene for further cleanup and restructuring. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17cache/cooker: Pass databuilder into bb.cache.Cache()Richard Purdie
Rather that the current mix of static and class methods, refactor so that the cache has the databuilder object internally. This becomes useful for the following patches for multi config support. It effectively completes some of the object oriented work we've been working towards in the bitbake core for a while. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17cache: Make virtualfn2realfn/realfn2virtual standalone functionsRichard Purdie
Needing to access these static methods through a class doesn't make sense. Move these to become module level standalone functions. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17cache/ast: Move __VARIANTS handling to parse cache functionRichard Purdie
Simple refactoring to allow for multiconfig support. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17runqueue: Abstract worker functionality to an object/arrayRichard Purdie
With the introduction of multi-config and the possibility of distributed builds we need arrays of workers rather than the existing two. This refactors the code to have a dict() of workers and a dict of fakeworkers, represented by objects. The code can iterate over these. This is separated out from the multi-config changes since its separable and clearer this way. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17cookerdata: Simplify prefiles/postfilesRichard Purdie
The current codepaths are rather confusing. Stop passing these as parameters and use the ones from when the object is created. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>