aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-01-18parse: don't add attempted files to dependenciesrbt/cacheRobert Yang
The attempts are the files that it tries to search but don't exist, it searches the file in BBPATH until find it, so the attempts might be very long when there are many layers, which causes bb_cache.dat very big (I have 54 layers, the bb_cache.dat can be 119M, and even much bigger depends on the order of BBLAYERS). Here is the testing data of 54 layers before and after the patch. Before After Parsing time 33s 9s Loading time 30s 5s Cache size 119M 20M The time and size can be more or less depends on the order of BBLAYERS before the patch. I checked the code, but didn't find why we need the attempts as dependencies, the one that I can think of is the file doesn't exist when parsing, and added to the attempts location after parsing, but the parseBaseConfiguration() can detect and handle this well (and will cause reparse in such a case), so I think that we can safely remove them from dependencies since they have side effects. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2018-01-18cache.py: improve debug messageRobert Yang
* Print message when cachefile is found/not can help debug. * Update "Using cache in" to "Cache dir:" since it was the same as the debug message of "codeparser & file checksum caches", which caused confusion. And whether the cache file will be used or not is still unknown at that time, so just print the cache dir. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2018-01-16bitbake-user-manual: Removed stray parenthesisKristi Rifenbark
Fixes [YOCTO #12016] Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-16bitbake-user-manual: Updated Hello World tutorialKristi Rifenbark
Fixes [YOCTO #12016] Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-16bitbake-user-manual: Replaced bad linkKristi Rifenbark
Fixes [YOCTO #11675] There was a "hambedded" link that was broken. The link was intended to show the bitbake.conf file. I replaced it with the link to show the actual bitbake.conf file. Signed-off-by: Kristi Rifenbark <kristi.rifenbark@gmail.com> Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-16bitbake-user-manual: Updated copyright year.Scott Rifenbark
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-16bitbake-user-manual: Updated 'bitbake -h' output example.Scott Rifenbark
Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-16bitbake-user-manual: Updated "Events" for BuildStarted eventScott Rifenbark
BitBake now fires off one "BuildStarted" event per configuration when it is configured for multiple configurations (multiconfig). I updated the bullet item for "bb.envent.BuildStarted()" to indicate that behavior. Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07fetch2/__init__: Disable pseudo in runfetchcmd()Peter Kjellerstedt
If a fetcher, e.g., git, is run when pseudo is active it will think it is running as root. If it in turn uses ssh (as git does), ssh too will think it is running as root. This will cause it to try to read root's ssh configuration from /root/.ssh which will fail. If ssh then needs to ask for credentials it will hang indefinitely as there is nowhere for it to ask the user for them (and even if there was it would not access the correct private keys). The solution to the above is to temporarily disable pseudo while executing any fetcher commands. There should be no reason for them to be executed under pseudo anyway so this should not be a problem. RP Ammendum: We finally did get more information about how to reproduce this problem, something needs to trigger bb.fetch2.get_srcrev() in a pseudo context, for example when AUTOREV is in use or the recipe doesn't have a defined SRCREV. That SRC_URI needs to be using protocol=ssh. This would trigger an ls-remote of the remote repo and if that happens under pseudo, the wrong ssh credentials may be attempted which can hang. [YOCTO #12464] Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07events: Drop unused cfg propertyRichard Purdie
The cfg property on events doesn't add much, all code appears to access "data" at this point. Remove it to clean up the interface. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07tests/fetch: Allow bit/bitbake-selftest to function correctlyRichard Purdie
Without this the paths to git-make-shallow are incorrect and cause test failures if bitbake isn't executed from cwd or PATH. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07tests/event: tests: Add event classes test classJair Gonzalez
This change adds EventClassesTest class to bb/tests/event.py, including 47 new test cases for the public interfaces of the bitbake event and related helper classes. [YOCTO #10773] Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07tests/event: Remove empty assignments from event testsJair Gonzalez
Remove assignments from non-returning calls. Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07tests/event: Add test for bb.event.worker_fireJair Gonzalez
Test the triggering of bb.event.worker_fire callback. Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-07tests/event: Include tests for event filtering featuresJair Gonzalez
This change includes unit tests for the following functions, helper class and methods in bitbake.event: - set_eventfilter(func) - set_UIHmask(handlerNum, level, debug_domains, mask) - getName(e) - class UIEventFilter(object) def __init__(self, level, debug_domains) def update(self, eventmask, level, debug_domains) def filter(self, event) [YOCTO #10773] Signed-off-by: Jair Gonzalez <jair.de.jesus.gonzalez.plascencia@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-01-02toaster: corrupted patch for bldcollector URL fileDavid Reyna
Fix a fatal error introduced by a corrupted patch file submission. [YOCTO #12459] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-19build.py: Don't return dependencies for tasks which don't existRichard Purdie
If for example you deltask do_build but it has recrdeps set, its confusing to have that list returned when the task no longer exists (same would apply to deps too if it was set after the deltask). Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: add 'nobuild' option to ToasterDavid Reyna
Add a 'nobuild' option for starting Toaster without the project and hosted builds support. This allows a Toaster host to provide local build statistics without opening the host to external users building projects. [YOCTO #12315] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: landing page show cmdline captureDavid Reyna
The Toaster initial landing page needs to show that it still has the command line build capture support in addition to the new project support. [YOCTO #12316] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: enable custom env support for shell callsDavid Reyna
Allow for custom environment additions for git cloning, for example for anspass support. [YOCTO #12193] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: some recipe events do not include packagesDavid Reyna
Allow for "SinglePackageInfo" events that do not include package data, for example OPKGN equal 'lib32-*' or 'lib64-*'. [YOCTO #12204] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: update Toaster for Django 1.11David Reyna
Toaster needs to accomodate API changes in Django 1.11. [YOCTO #12192] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-18toaster: unset BBPATH before starting bbserver for backwards compatibilityDavid Reyna
The latest build enviroment script is now setting BBPATH. This breaks building previous releases from a master-based Toaster, because with this newly inherited BBPATH value the 'bitbake.lock' file ends up in the Toaster build directory instead of the project's build directory. Toaster should always clear BBPATH so that the bbserver's environment is clean (enough). [YOCTO #12363] Signed-off-by: David Reyna <David.Reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-12-10providers: Fix determinism issueRichard Purdie
We saw builds where runtime providers were sometimes changing order and the build result was therefore non-deterministic. For example it could show: DEBUG: providers for lib32-initd-functions are: ['lib32-lsbinitscripts', 'lib32-initscripts'] or DEBUG: providers for lib32-initd-functions are: ['lib32-initscripts', 'lib32-lsbinitscripts'] which could cause a test to pass or fail. This change ensures we don't rely on the random order of dictonaries in memory and act deterministically. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-29fetch2: fix unpack of .txz filesAndré Draszik
.txz is the same as .tar.xz, and can be found in the wild. Signed-off-by: André Draszik <git@andred.net> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-21fetch/wget: use with to ensure the response is closedRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-21fetch/wget: improve proxy objectRoss Burton
The connection cache class uses a dummy file object but it doesn't have a closed attribute, so we can't use it in a context manager. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-11cooker: fix typo in bitbake -g messagePaul Eggleton
Flatened -> flattened. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-11tinfoil: ensure get_recipe_info() returns Null if recipe not foundPaul Eggleton
If a matching recipe is not found then return Null instead of raising KeyError because we were blindly using None as a key for pkg_fn. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-11bitbake-layers: show-recipes: fix help to mention -i supports multiple classesPaul Eggleton
The -i option supports more than one class, but the help didn't mention that. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-11bitbake-layers: remove-layer: support removing multiple layers at a timePaul Eggleton
If you can add multiple layers at once, it stands to reason that you should also be able to remove more than one at a time. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-11bitbake-layers: add-layer: enable adding multiple layers at oncePaul Eggleton
Allow specifying multiple layers with bitbake-layers add-layer so that you can add more than one in a single command. This is not just useful, it's actually pretty important if you need to add a layer and its dependencies at the same time - since we now go through a parse process when the layer is added, without this you have to add them all in just the right order and wait for the parse each time which is somewhat painful. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-11runqueue: Fix typo builable -> buildableRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-08tinfoil: Ensure we clean up loggersRichard Purdie
This is primarily paranoid but ensure we remove any loggers we setup either directly or indirectly so the initial state is restored after we exit. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-08event: Ensure we clean up loggersRichard Purdie
Whilst we're likely exiting in this case, clean up the loggers we add so that in the case of certain server retries there is no possibility multiple loggers stack up. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-07tests/fetch: Add ftp test urlRichard Purdie
Add in a tets ftp url so we ensure ftp urls contnue to work after the loss of the ftp.gnu.org ones. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-07tests/fetch: use subtests in the wget testsRoss Burton
As we test multiple URLs in this these tests and one failing abandons the test, use subtests so all URLs are tested. This should help us identify patterns in the failing URLs. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-07tests/fetch: Switch gnu.org urls from ftp -> http/httpsRichard Purdie
The ftp server at ftp.gnu.org is likely to be retired at some point soon so siwtch over to the http/https services. This means bitbake-selftest doesn't have ftp test urls, however finding stable ftp test servers is proving increasingly hard. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-07fetch2: Fix missing logger import in repo fetcherOleksandr Andrushchenko
After cleaning deprecated API usage repo fetcher is missing logger as it was indirectly imported via deprecated bb.data. Fix this by importing logger directly. Fixes: 9752fd1c10b8 ("fetch2: don't use deprecated bb.data APIs") Signed-off-by: Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-07bitbake-layers: Add support for multiple recipes at onceMark Hatle
bitbake-layers show-recipes and show-appends supported listing all recipes or one recipe. Adjust the system to permit specifying more then one recipe. Also update show-appends to match the --help description and support file style wildcards for selecting the recipe to display. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-07bitbake: be more explicit when warning about locale choiceRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-11-05tests/fetch: skip network tests the idiomatic wayRoss Burton
Instead of not even having the test functions if network tests are disabled, use a custom decorator to mark the network tests and skip them. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31main: Give a user readable error if we can't locate topdirRichard Purdie
Currently if you run bitbake in an invalid directory, the user experience is poor: birbake/lib/bb/main.py", line 427, in setup_bitbake topdir, lock = lockBitbake() File "./bitbake/lib/bb/main.py", line 494, in lockBitbake lockfile = topdir + "/bitbake.lock" TypeError: unsupported operand type(s) for +: 'NoneType' and 'str' This ensures we exit straight away with a better error message. [YOCTO #12163] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31cooker: fix watching directories with Python 3.6+Paul Eggleton
In Python 3.6, glob.glob() was reimplemented to use os.scandir() (which itself appeared in Python 3.5), thus our monkey patching of os.listdir() here was no longer effective. The end result was not only that bitbake wouldn't notice added recipes or bbappends with BB_SERVER_TIMEOUT set when being run with Python 3.6 (the shipped Python version on Fedora 26 and some other distribution versions), it also broke devtool modify, devtool upgrade and devtool extract since they rely on the ability to create a bbappend on the fly and have bitbake pick it up. To fix it, do the same monkey patching for os.scandir(), which needs to be conditional upon that actually existing since we have to support Python 3.4 that doesn't have it. Long term we should probably look for a better way to handle this that doesn't involve monkey patching Python library code. Fixes [YOCTO #12185]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31bitbake: Update version to 1.37.0 for developmentKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-31bitbake: Update version to 1.36.0 for stable releaseKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-10toaster/highlight.pack.js: Fix corrupted fileRichard Purdie
The newly added file in the last commit was corrupted, fix it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-10toaster: Remove prettifyDavid Reyna
Remove "prettify.js" and "prettify.css" due to license issues with Apache2. Replace with "highlight.pack.js" with its BSD3 License. [YOCTO #12206] Signed-off-by: Jason Wessel <jason.wessel@windriver.com> Signed-off-by: Brian Avery <brian.avery@intel.com> Signed-off-by: David Reyna <david.reyna@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07README: new readme file including main aspects of the projectLeonardo Sandoval
Includes brief description of the project, pointers to website, documentation, mailing list and source code. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-10-07bitbake-user-manual-metadata: include a space on a append exampleLeonardo Sandoval
By definition, the override operator "_append" does not include a space, so include it. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>