summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* Rename the ui 'init' method to 'main'Chris Larson2011-01-046-21/+10
| | | | | | | | | | As these may run the UI in a blocking fashion and then return the exit code, 'init' was an inappropriate name, and 'main' is more appropriate. (Bitbake rev: 4d081a0ed759bd526ab01849d650bd9e8d80ddd1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: use re match, not search in re_match_stringsChris Larson2011-01-041-1/+1
| | | | | | | | | | | | We want to match the requested pattern at the beginning of the string, otherwise things behave in an unintuitive manner wrt ASSUME_PROVIDED (e.g. ASSUME_PROVIDED += "gtk+" will also assume foo-gtk+ is provided), and the user can always use '.*gtk+' to get the old behavior. (Bitbake rev: 5670134ab2eb573d39df3c3231677cdb1a1dfc72) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* taskdata: use 'any' in re_match_stringsChris Larson2011-01-041-7/+3
| | | | | | | (Bitbake rev: e48e9a2150ee76aaf151f6d5bc9e86e6ae4de514) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: add shutdown/stop methodsChris Larson2011-01-042-2/+8
| | | | | | | (Bitbake rev: fc64eff03fe1f41e59128cb3df0ef2161e24a8cb) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: merge cookerState and cookerActionChris Larson2011-01-042-25/+15
| | | | | | | (Bitbake rev: c7c8945ef7ca9465312e630b7fa5f0a87ac8b6c7) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: use a pool, abort on first parse errorChris Larson2011-01-041-84/+60
| | | | | | | (Bitbake rev: 9caf65e79f95fe0045e727391e974c4c1e7411ff) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* knotty: use enumerate for task waitingChris Larson2011-01-041-3/+1
| | | | | | | (Bitbake rev: 89ce8df075ac8c9a5478c86405e6e6b60346a51c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* knotty: shift non-interactive progress into a classChris Larson2011-01-041-15/+33
| | | | | | | (Bitbake rev: c3d005cbbae3d56da9926666cfb1501c2bf96ea7) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix the <100 recipe progress fixChris Larson2011-01-041-1/+1
| | | | | | | (Bitbake rev: 424428a764651183218f9cc93bc05496867aa5de) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Error more pleasantly when trying to use python2.4Chris Larson2011-01-041-10/+11
| | | | | | | (Bitbake rev: 57402ee727c8c1d8f5017534fb0f5e0b20aaaa5b) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Don't show a traceback for a python version errorChris Larson2011-01-041-1/+4
| | | | | | | (Bitbake rev: 44c325306e55336b7b416fd88b39874012a3f603) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: don't choke on <100 recipes to parseChris Larson2011-01-041-1/+1
| | | | | | | (Bitbake rev: 2be5169a01e57bcfcb1f75cbd6bac3bf0f230edd) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: no cached in progressbar and add ETAChris Larson2011-01-043-20/+12
| | | | | | | | | | | | Rather than updating the progress bar based on the recipe being processed (whether cached or parsed), consider only parsed recipes. This reduces the instability in progress rate introduced by the cached entries, and allows the ETA to be resurrected and be a bit more useful. (Bitbake rev: 618480f7739f6ae846f67a57bee5a78efb37839d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: change to more incremental formatChris Larson2011-01-041-22/+33
| | | | | | | (Bitbake rev: 4fe4ffbef3885887c97eebe021edc3f23feab9ea) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: pass back child exceptions to the serverChris Larson2011-01-041-6/+12
| | | | | | | (Bitbake rev: 0f68f8bcd0e0aa944f76f88a4a85c9bcc1e42bee) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* vercmp: don't choke on empty first version componentsChris Larson2011-01-041-1/+1
| | | | | | | (Bitbake rev: e75aa94e9477933c5a40021b2a8e844db54f29da) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Use __file__, not sys.argv[0]Chris Larson2011-01-042-2/+2
| | | | | | | (Bitbake rev: 97e92abe49663eee189c89c1dc91fe69891faf73) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: ensure 'pn' is included in the pkgvarsChris Larson2011-01-041-12/+12
| | | | | | | (Bitbake rev: cefc28a2aa1e5703119dacfd885c8c159a1e47a3) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* knotty: drop the ETA from the progressbar for nowChris Larson2011-01-041-1/+1
| | | | | | | | | | | | | | Currently, the progress bar is an indication of the processing of our recipes, which includes loading the cache file, then for each recipe, either adding the existing cached information to the CacheData or parsing the recipe from disk. These tasks clearly take different amounts of time, so the ETA is unreliable today. We'll resurrect this functionality after we revamp the progress handling, fully incorporating the load of the cache file. (Bitbake rev: 80867372dcbef91ebaf7d77a77ca871741dd3f74) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: ensure that the cache sync completesChris Larson2011-01-041-2/+7
| | | | | | | | | | | Without explicitly joining the thread, it's possible for the process to end (e.g. after a bitbake -p) and kill off the thread without waiting for it to exit cleanly. So, register the thread join with atexit. (Bitbake rev: 97ce57e6f860d3e6f34cc7a603ed1eeac4f423d3) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: get number of threads in constructorChris Larson2011-01-041-3/+3
| | | | | | | (Bitbake rev: e7fd259d1528f48b0812fb7b0a54dd6d5d22f4a9) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: don't add info for skipped recipesChris Larson2011-01-041-2/+3
| | | | | | | (Bitbake rev: ac596d55de4ad86e1cdc84dabfea1350dd54efd0) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: show progress bar before initializing the cacheChris Larson2011-01-041-13/+16
| | | | | | | | | | | | | This ensures that the time spent loading the cache from disk occurs with the progress bar up. Though the progress bar stays at 0% during this period, I think this is an improvement over the multi-second stall which occurred previously before the progress bar came up. Ideally, we'd integrate cache loading from disk into the progress display, but this is a first step. (Bitbake rev: f6d0a5c219f9deb84f702450d30d868ba6271f77) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: save progress chunk value (total/100)Chris Larson2011-01-041-1/+2
| | | | | | | (Bitbake rev: 09333737cbeeb9875d938521ddcd519fc808bcc3) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: stop loading the cache for -bChris Larson2011-01-044-32/+33
| | | | | | | | | | | Previously, the cache was actually being loaded from disk twice whenever using -b or -e -b. This also moves the bb_cache instance into the CookerParser, as it's not needed by the cooker itself at all. (Bitbake rev: dd0ec2f7b18e2a9ab06c499b775670516bd06ac8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cooker: don't fire unnecessary parse progress eventsBob Foerster2011-01-041-1/+3
| | | | | | | (Bitbake rev: 7cf7d5f14405681496fced3640a50a20ef1acac1) Signed-off-by: Bob Foerster <robert@erafx.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: don't add info to cache if cache is disabledChris Larson2011-01-041-0/+3
| | | | | | | (Bitbake rev: f12bb303f3d86a68d0b3dda1112dd654b9251704) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: sync the cache file to disk in the backgroundChris Larson2011-01-044-43/+60
| | | | | | | | | | | | | | | | This version uses a thread rather than a process, to avoid problems with waitpid handling. This gives slightly less overall build time reduction than the separate process for it did (this reduces a -c compile coreutils-native by about 3 seconds, while the process reduced it by 7 seconds), however this time is quite insignificant relative to a typical build. The biggest issue with non-backgrounded syncing is the perceived delay before work begins, and this resolves that without breaking anything, or so it seems. (Bitbake rev: 5ab6c5c7b007b8c77c751582141afc07c183d672) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Simplify cache syncingChris Larson2011-01-041-22/+13
| | | | | | | | | | | Rather than adding nocache items to the cache, then copying the cache and removing them to sync it, don't add them in the first place. Also use 'with' for the cachefile. (Bitbake rev: 343b6f6255ad020c39e30742175a241f0859a5a6) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Experimental usage of the 'progressbar' moduleChris Larson2011-01-042-8/+396
| | | | | | | (Bitbake rev: 64feb03bc2accecb49033df65e0a939ef5ab5986) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Implement parallel parsing supportChris Larson2011-01-043-77/+157
| | | | | | | | | | | This utilizes python's multiprocessing module. The default number of threads to be used is the same as the number of available processor cores, however, you can manually set this with the BB_NUMBER_PARSE_THREADS variable. (Bitbake rev: c7b3ec819549e51e438d293969e205883fee725f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: don't write out the cache unnecessarilyChris Larson2011-01-041-1/+5
| | | | | | | | | | | If the only recipes's we reparsed this run were those flagged as not to be cached, there's no point in re-saving the cache, as those items won't be included anyway. (Bitbake rev: 1e0c4dbcbec886a30b89f8b4bb365c3c927ef609) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: create and use a RecipeInfo classChris Larson2011-01-042-175/+197
| | | | | | | | | | | | | | | | | | This class holds the particular pieces of information about a recipe which are needed for runqueue to do its job. By using it, I think we improve code clarity, reduce method sizes, reduce overuse of primitive types, and prepare for parallel parsing. In addition, this ditches the leaky abstraction whereby bb.cache attempted to hide the difference between cached data and a full recipe parse. This was a remnant from the way things used to be done, and the code using it had to know the difference anyway. If we choose to reimplement caching of the full recipes, we can do it in bb.parse, in a completely transparent way. (Bitbake rev: 992cc252452221f5f23575e50eb67528b2838fdb) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Prefer xrange over range for small performance gain.Bob Foerster2011-01-044-37/+37
| | | | | | | | | | | | | | range() allocates an actual list when called. xrange() is just an iterator and creates the next range item on demand. This provides a slight performance increase. In python 3, range will do what xrange does currently, but the upgrade will be handled by the 2to3 tool. (Bitbake rev: 73b40f06444cb877a5960b2aa66abf7dacbd88f0) Signed-off-by: Bob Foerster <robert@erafx.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Revert "svn fetcher: warn people to switch to SRCREV"Chris Larson2011-01-041-2/+1
| | | | | | | | | 1) too spammy 2) can be implemented in the metadata instead This reverts commit 8da9744fcdf856abebcfbe9e3bc1b8cf07bc317b. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: make loadDataFull a classmethodChris Larson2011-01-041-4/+5
| | | | | | | (Bitbake rev: 16a9d689e61c35cfca94bbecd9772eab3c5072ba) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* svn fetcher: warn people to switch to SRCREVBernhard Reutner-Fischer2011-01-041-1/+2
| | | | | | | | | as noted by rp in ac00ca89a4e43cd4f38ba86455079d31be78e644 (Bitbake rev: 8da9744fcdf856abebcfbe9e3bc1b8cf07bc317b) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* fetch: be more pythonicBernhard Reutner-Fischer2011-01-049-64/+21
| | | | | | | | | no functional changes (Bitbake rev: e88834fb7c6821cc29c12d296f2edd51f6eb3746) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* fetch: use os.path.joinBernhard Reutner-Fischer2011-01-041-1/+1
| | | | | | | (Bitbake rev: c360b01df18d90a513a3d61d395f905102e7568e) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* fetch: add common helper _strip_leading_slashes()Bernhard Reutner-Fischer2011-01-046-22/+13
| | | | | | | | | | Several fetcher need a way to strip leading slashes off a local path. This helper-function consolidates all such occurances. (Bitbake rev: 823a02185ed109054c6c1ae366221aaed0353f24) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* fetch: rename suppports_srcrev to supports_srcrevBernhard Reutner-Fischer2011-01-046-8/+8
| | | | | | | | | osc had it already spelled correctly?! (Bitbake rev: b8bb4433de7a981c6826173e926ca34705c4ac70) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: Add debug msg for a nonexistant dep fileChris Larson2011-01-041-0/+2
| | | | | | | | | | If a recipe depends on a file, and that file is out of date, we show a message, but if that file was removed, we do not, until now. (Bitbake rev: 67984ba0ac2db79874541bc031f2e3e9ff7a6c32) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: use new style classesChris Larson2011-01-041-6/+3
| | | | | | | (Bitbake rev: e084430446be2544dd1a6b627088f888c37cc7f0) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: pyflakes/pep8/pylint cleanupChris Larson2011-01-041-29/+40
| | | | | | | (Bitbake rev: 06420ff839ffc37de3e42474b8b0e47c4608a985) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: use set for clean, checkedChris Larson2011-01-041-11/+9
| | | | | | | (Bitbake rev: 3a776ef947e23b1a04bdd9e78a3a0c4616249b0e) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache: make use of defaultdictChris Larson2011-01-041-34/+10
| | | | | | | (Bitbake rev: 7171019b11ad656d0edb979564941fcf92ab0a02) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Pre-explode rundeps/runrecs in CacheDataChris Larson2011-01-043-8/+10
| | | | | | | (Bitbake rev: 0c8e0f3191252ccedb83c431c48e5c7d905e2717) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* persist_data: handle locked db for SELECTChris Larson2011-01-041-3/+1
| | | | | | | | | | Parallel processes interacting with the persist_data db can quite easily explode without this. (Bitbake rev: b3d5432cff0ff28f4c8a5bcf10efa3e383b4fd4d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* BBHandler: use os.path in inherit()Bernhard Reutner-Fischer2011-01-041-1/+1
| | | | | | | (Bitbake rev: 5b85de2c71973ba490b95a5d9ab634635f395142) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* BBHandler: simplify supports()Bernhard Reutner-Fischer2011-01-041-1/+2
| | | | | | | (Bitbake rev: 858d704d713d15bf97053eb1374758c74b0d8874) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>