summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2012-01-20Bump the version to 1.15.11.15.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20prserv: fix import of sqlite3Martin Jansa
* this is used in all other bitbake parts where sqlite3 is used, don't know why it wasn't used here, but it fails e.g. on Gentoo Traceback (most recent call last): File "bin/bitbake", line 39, in <module> from bb import cooker File "lib/bb/cooker.py", line 39, in <module> import prserv.serv File "lib/prserv/serv.py", line 4, in <module> import xmlrpclib,sqlite3 ImportError: No module named sqlite3 Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20setup.py: install prserv tooMartin Jansa
* otherwise cooker fails: Traceback (most recent call last): File /usr/bin/bitbake, line 39, in <module> from bb import cooker File /usr/lib64/python2.7/site-packages/bb/cooker.py, line 39, in <module> import prserv.serv ImportError: No module named prserv.serv Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20siggen.py: Abstract the runtime task dependency handling code in the generatorsRichard Purdie
This means that custom signature handlers can override specific parts of the code without having to reimplement whole functions allowing them more flexibility. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20cooker.py: Allow siggen classes to be added by the metadataRichard Purdie
By calling init_parser which sets up the siggen code after the ConfigParsed event is fired, we can allow the metadata to add siggen classes which was always what the code intended. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20bitbake/fetch2: allow resuming interrupted fetchPaul Eggleton
A lot of our checks in the fetcher code assume that if the downloaded file exists, the download finished successfully; this meant that if BitBake was interrupted in the middle of a fetch then it would not resume the fetch the next time, but instead attempt to use the half-fetched file and usually fail as a result. Since we're already writing a ".done" stamp file when a fetch completes, just check for its existence and assume the download didn't complete successfully if it isn't present. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20bitbake/runqueue: always log tasks summaryPaul Eggleton
It's unclear from the history but at some point we stopped logging the "Tasks Summary" NOTE when tasks failed. Reinstate this for failure, and also make the count of attempted tasks include the failed task. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20siggen: Ensure correct runtask dependency output is shown for diffsigsRichard Purdie
The actual task names are discounted for comparison of dependent tasks, only the actual hashes are used. This updates the comparison code to account for this change, attempting heuristic matching for more user friendly output but falling back to showing the changed hashes directly. This avoids some confusing output to users where it looked like tasks had changed when they had not and actually had the same hash but a different taskname. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20usermanual: Correct "inherit" search to bbclass from oeclassDarren Hart
Bitbake looks for bbclass now, not oeclass. Update the docs accordingly. Signed-off-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20cooker: use futures rather than a multiprocessing poolChristopher Larson
This avoids some silent parser hangs we were seeing which were near impossible to debug as no user feedback was given. [RP: Tweak commit message] Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-20Add dependency on the backported python 3.2 concurrent.futuresChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com>
2012-01-19bitbake/persist_data: Reconnect when DB is lockedLianhao Lu
[YOCTO #1761] Reconnect to the backend Sqlite DB in 'database is locked' exception so the timeout can be leveraged in each time retry. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/knotty: print task failure summaryPaul Eggleton
Remove the error logged within cooker summarising the list of failed tasks, and instead print this in the UI (knotty) where it belongs. This also adds the actual name of the task that failed as well as the corresponding recipe file that was being shown previously. In addition, reformat the summary messages more tidily - no extra breaks between lines and use correct English singular/plurals, with some allowance for future translation. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/cooker: avoid printing stack trace for -b match errorPaul Eggleton
Improves error output for matching problems when the -b / --buildfile command line option is used. Rename MultipleMatches exception to NoSpecificMatch (as it is also raised when there are no matching recipes) and make it inherit from BBHandledException so that it doesn't print a stack trace (we always log an ERROR prior to raising it.) In addition, improve the formatting of the error message - only call the log function once rather than once for every match, and use a more appropriate message if there are no matches. Fixes [YOCTO #1141] Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/fetch2: reduce output for fetch failuresPaul Eggleton
Make the warning for the initial fetch failure a single line - we don't need the full command and output here yet, but write it into the log in full as a debug message. However, if fetching from mirrors fails as well then print out the full details for the first error that occurred as an ERROR rather than a WARNING. Since this is logged as an ERROR, combined with an earlier patch it suppresses the full log which does make the output much more readable for any fetch error. Fixes [YOCTO #1832]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/knotty: avoid printing full task log when error already printedPaul Eggleton
If a task has logged an ERROR then don't print the contents of the task's log file in knotty (the default terminal UI). As a side-effect we now also respect BBINCLUDELOGS in knotty; if it is false we never print the log (but the pointer to the log file is always printed). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/fetch2: correctly decode exit signal/statusPaul Eggleton
The termination signal and exit code of the fetch process were not being decoded correctly, resulting in bitbake reporting that the process terminated with a signal of the exit code (if it was under 255). There are functions in the Python os module to do this decoding correctly (for Unix at least), so let's use them. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/runqueue: avoid "failed" in task summary if nothing didPaul Eggleton
Seeing the word "failed" alone without reading the whole context has occasionally triggered an automatic assumption on the part of some users (myself included) that something has gone wrong, even when this message is telling you that "0 [tasks] failed". To avoid this let's just say "all succeeded" in this case instead. As a bonus this means you can now search the output for "fail" and not find anything if all went well. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/fetch2: improve error formatting for fetcher errorsPaul Eggleton
* The "name" argument to FuncFailed is rarely used as a name in actual usage within bitbake, so don't treat it as one in the output. * Don't print URL for FetchError if it was not specified (i.e. don't output "Fetcher failure for URL 'None'") * Don't include URL in "unable to fetch from any source" message since we supply it to FetchError and it will be printed anyway. * Don't include URL in "checksum failed" message for the same reason Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-15bitbake/knotty: don't count errors as warnings in summaryPaul Eggleton
The count of warnings being shown in the summary at the end was also including the number of errors. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-11bitbake: Automatically start local PR service.Lianhao Lu
[YOCTO #1126] A local PR service will be started and stopped automatically along with the bitbake invocation/ternimation. This local PR service will be started only and if only when the PRSERV_HOST is set to 'localhost' and PRSERV_PORT is set to '0'. When started, the sqlite3 database is stored at "${PERSISTEN_DIR}/prserv.sqlite3" or "${CACHE}/prserv.sqlite3". Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-11bitbake/PRservice: Added no_hist mode and export/import.Lianhao Lu
[YOCTO #1556] 1. Added the package_arch into the index to the DB table. Because the change in PACKAGE_ARCH will results in different checksum, and it is better to have seperate PR value domains for differnt PACKAGE_ARCH of the same pakcage. 2. Changed the PR service to operate in no history mode. In this mode, the for a given query tuple (version, pkgarch, checksum), the returned value will be the largest among all the values of the same (version, pkgarch). This means the PR value returned can NOT be decremented. 3. Added export function. For each (version, pkgarch) tuple, only the record with the maximum value will be exported. 4. Added import function. The record will only be imported if the imported value is larger than the value stored in the DB with the same (version, pkgarch, checksum) tuple. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-10bitbake: Add BBHandledException exception classRichard Purdie
We have a problem knowing when to show the user debug information and when not to since the code has already shown the user suitable information about why a failure is occurring. This patch adds a bb.BBHandledException exception class which can be used to identify those exceptions which don't need further explanation to the user. This patch uses this class for the bb.providers exceptions and ensures the command handling code correctly filters the exceptions meaning that "bitbake invalid" now shows an simple error message and not a python traceback. [YOCTO #1141 partial] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-10bitbake/knotty: Show summary of warning/error messages shownRichard Purdie
Show a summary count of warning/errors messages shown to the user during the build and make it clear when an error exit code is being set. [YOCTO #1540] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-10bitbake-layers: close files in apply_append()Paul Eggleton
It's recommended practice to close files when finished with them and the code in this function was not doing this. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-10bitbake-layers: flatten: warn the user if output structure is incorrectPaul Eggleton
If you flatten layers that have different directory structures you may not end up with a usable layer in the output directory - some files won't be picked up by BitBake. To try to avoid this problem, once flattening has completed, get the BBFILES entries that correspond to the layer from which the output layer's conf/layer.conf came from, and check through all of the .bb/.bbappend files in the output directory to see if any will not be referred to by BBFILES in the output layer. If any are found, show a warning to the user. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-10bitbake-layers: flatten: allow specifying layers to flattenPaul Eggleton
You can now optionally specify two or more layers to flatten into the output, rather than flattening all of the layers in the current configuration (but this is still the default behaviour if no layers are specified). Note that this means the output layer may still contain bbappends where the corresponding recipes are not present in the list of layers to flatten. There is also a caveat when a layer not being flattened would be "inbetween" the flattened layers (see the command help for details.) Implements feature request in [YOCTO #1564]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06command.py: add parseConfigurationFiles APIDongxiao Xu
The parseConfigurationFiles API calls the related function in cooker.py to parse config files. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06bitbake: add a new option "--server-only"Dongxiao Xu
Create a new option "--server-only" for bitbake command, which allows bitbake runs as a server, and let frontend connect the server itself. "--server-only" should work with "-t xmlrpc", or bitbake will exit. bitbake --server-only -t xmlrpc will print out the server address and port information. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06cooker: remove command import in cooker.pyDongxiao Xu
There is no direct use of command in cooker.py, and it is using bb.command instead. Remove command in the import list. This fixes a problem of embedded import between command.py and cooker.py. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06cooker: remove command import in cooker.pyDongxiao Xu
There is no direct use of command in cooker.py, and it is using bb.command instead. Remove command in the import list. This fixes a problem of embedded import between command.py and cooker.py. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06xmlrpc: Change BitbakeServerInfo init functionDongxiao Xu
Pass host and port to BitbakeServerInfo class instead of the "server" instance. With this change, GUI can connect with server individually by host address and port. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06command.py: add initCooker APIDongxiao Xu
initCooker is to set the cooker to the initial state with nothing parsed. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06cooker: user bb.configuration.data to inject eventsDongxiao Xu
For buildTargets function, we use bb.configuration.data as parameter to inject events, since in hob environment, some variables are modified dynamically and bb.configuration.event_data may out of date. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-06command.py: Modify needcache value for certain functionsDongxiao Xu
for findConfigFiels() and findFilesMatchingInDir() functions, they don't need to parse all the bb files, thus setting the needcache value to be False. Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-05cooker.py: Add missing BB_WORKERCONTEXT conditionalsRichard Purdie
Its desireable to run be able to execute bitbake tasks directly, only loading as much of the cooker is as necessary to do this. This use case can be identified by the BB_WORKERCONTEXT variable. There were a couple of places cooker code needed to be conditional on this but wasn't. This brings in the missing conditionals from poky where those code paths are used more heavily completing the support in master. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-05bitbake/runqueue: Improve the setscene loggingRichard Purdie
When debugging setscene problems it was found that some extra debug messages were useful. This patch adds them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-05cooker.py: Convert a bb.data.expand refernce to the updated syntaxRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-04fetch2/git: change colon to dot in ud.hostJuraj Hercek
Local cloning of git repositories from DL_DIR into WORKDIR fails when using ssh URL with port specification e.g. "ssh://user@host:port/path/to/repo.git". Git fetcher clones such remote repository into "${DL_DIR}/git2/host:port.path.to.repo.git". However, when clonging from ${DL_DIR}/git2/host:port.path.to.repo.git into ${WORKDIR}, git fetcher fails with "ssh: Could not resolve hostname ${DLDIR}/git2/host: Name or service not known". A solution is to replace ":" by "." in host component, similarly as it is done when replacing "/" with "." in path component, so that local clone directory in DL_DIR looks like this: "host.port.path.to.repo.git". Signed-off-by: Juraj Hercek <juraj.hercek@jhksoftware.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-01-04bitbake-layers: fix Python error during parsePaul Eggleton
If "bitbake-layers show_layers" was run when the cache was dirty forcing a parse, it failed with the following error: ERROR: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception AttributeError: 'module' object has no attribute 'fetch2' A simple import of bb.fetch2 in bitbake-layers fixes this. Fixes [YOCTO #1855]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-20ui/crumbs/hobprefs: trigger a reparse after changing IMAGE_FSTYPESJoshua Lock
As reported on the mailing list[1] when changing IMAGE_FSTYPES through the hob preferences a reparse is required before the changes will be picked up by the system. This patch sets the reload_required property of the class to true when the image types have been modified to ensure the reparse is triggered. 1. https://lists.yoctoproject.org/pipermail/yocto/2011-December/006002.html Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-20ui/crumbs/runningbuild: handle InvalidTask eventsJoshua Lock
The knotty UI just ignores these and so should RunningBuild, if these events aren't handled the UI appears to hang. Fixes [YOCTO #1665] Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-20vim/syntax: Recognize ?? operatorKhem Raj
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-05siggen.py: If both sigs have a variable in it's whitelist then don't say ↵Matthew McClintock
it's changed Some BB_HASHBASE_WHITELIST variables are in the lists of variable dependencies for signatures. Ignore those differences in lists since this difference does not matter Signed-off-by: Matthew McClintock <msm@freescale.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-05Remove the async_cmds and sync_cmds from command.pyRobert Yang
In bitbake/lib/bb/command.py::Command::__init__, we have the following lines: for attr in CommandsSync.__dict__: command = attr[:].lower() method = getattr(CommandsSync, attr) sync_cmds[command] = (method) for attr in CommandsAsync.__dict__: command = attr[:].lower() method = getattr(CommandsAsync, attr) async_cmds[command] = (method) The sync_cmds and async_cmds are defined as global dictionaries, but it seems that we've never used them (I did a "grep -r async_cmds bitbake/", , there is no result except the ones that I have removed), and I can't find the history of it from "git log -p", I guess that they have been replaced by the self.cmds_sync and self.cmds_async. [YOCTO #1791] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-05fetch2: fix Exception parameters when BB_STRICT_CHECKSUM enabledJoshua Lock
BB_STRICT_CHECKSUM caused a backtrace as the FetchError parameters are incorrectly specified such that FetchError is being passed 8 params when it's expecting 3. This fixes the parameters so we're passing a formatted string and the url. Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-01cooker.py: Allow the -e option to work with virtual classes and -bRichard Purdie
Using bitbake -e -b virtual:xxxx:/path/to/the.bb would result in zero matches since the virtual:xxxx piece wasn't being processed. This adds in the necessary functionality to handle it correctly. [YOCTO #1793] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-12-01build.py: Be determistic about a function's cwdRichard Purdie
There is a subtle but nasty problem that a function's cwd can vary depending on whether ${B} (often ${S}) exists before the funciton is called or not. Most functions in the system can cope with this but its bad practise and I've just witnessed build failures resulting from this during image generation from bootimg.bbclass. I also suspect this could explain some odd fetcher behaviour witnessed in the past. This change ensures we always call funcitons with a specific build directory making things deterministic. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-27Update users of getVar/setVar to use the data store functions directlyRichard Purdie
(From Poky rev: affd0907253387cee0ba0c7e9f92bcc109895446) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-25bitbake/siggen.py: Don't backtrace if the taskhash data isn't presentRichard Purdie
This allows the code to safely fall back to dumping the basehash data if the taskhash data isn't present for some reason. We could effecitvely obsolete the runtime option and use this approach instead exclusively. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>