summaryrefslogtreecommitdiff
path: root/bitbake/lib
Commit message (Collapse)AuthorAgeFilesLines
* Add a missing import of print_functionChris Larson2010-07-021-0/+1
| | | | | | | (Bitbake rev: 30ae747cc5c733512e417c61fca23c0cd15b0e44) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Apply the 2to3 print function transformChris Larson2010-07-0217-218/+220
| | | | | | | (Bitbake rev: ff2e28d0d9723ccd0e9dd635447b6d889cc9f597) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Deprecate the usage of certain objects via certain modulesChris Larson2010-07-022-4/+42
| | | | | | | | | | | | As an example, this displays a deprecation warning for the use of "bb.encodeurl" when you should be using "bb.fetch.encodeurl". It includes a convenience function for this purpose. It should be of use when moving objects between modules permanently, changing the API the user sees. (Bitbake rev: 78f56049ba863b2e585b89db12b32697eb879bbc) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Exception handling fixupsChris Larson2010-07-021-2/+2
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add some missing docstringsChris Larson2010-07-021-0/+3
| | | | | | | (Bitbake rev: 20b6f2d1d2d4541e612e8cffbdf1ca4822a3e394) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop __all__ usageChris Larson2010-07-023-34/+0
| | | | | | | (Bitbake rev: b4983cc7bfe5300c1d2904f34fb03d4fb2f41d90) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop some unused functionsChris Larson2010-07-021-28/+0
| | | | | | | (Bitbake rev: eb83df5bc7077685f314df01949cf06850e4693c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop some unused classesChris Larson2010-07-022-4/+0
| | | | | | | (Bitbake rev: 5cc47a49518c69c94f8b78e9dda6d542ba17b1e8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop some unused varsChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: b79ca5f1cc2d262de877047769ce25279ba26672) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Import fixupsChris Larson2010-07-0214-40/+33
| | | | | | | (Bitbake rev: 4fa052f426e3205ebace713eaa22deddc0420e8a) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Formatting cleanupsChris Larson2010-07-0240-575/+544
| | | | | | | (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop doctest, as we aren't utilizing itChris Larson2010-07-023-175/+14
| | | | | | | | | | | We should add back in some proper unit testing. Doctest is rather limited, and we haven't actually made use of it since the original implementation of the datastore when the project started, as far as I'm aware. (Bitbake rev: 3a11c2807972bbbddffde2fa67fc380d159da467) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Don't run metadata event handlers for bb.msg eventsChris Larson2010-07-021-0/+4
| | | | | | | (Bitbake rev: 297305b3742323d09d9ca58e958c4f18e945a148) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Stop using functions via 'bb' that were moved from there to other modulesChris Larson2010-07-023-7/+9
| | | | | | | (Bitbake rev: 03a6c26f8da226f442c3cab557e4733f7cd6eeac) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add a function to get the debug level, without poking into debug_levels manuallyChris Larson2010-07-021-0/+3
| | | | | | | (Bitbake rev: 6ccc01a1a72ec354de52fef2bf5620384b8461ce) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix invalid logging domain warningChris Larson2010-07-021-3/+3
| | | | | | | (Bitbake rev: 8441fab6f27191fcc3c153a10753871e6aef08b1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Make the default domain a proper domain, not a stringChris Larson2010-07-021-26/+29
| | | | | | | | | | This lets you do -l Default on the commandline to bump the debug level of messages with no domain, without bumping the level of everything else. (Bitbake rev: bef33dfc36713d8c93e38e63ddac2e4f9858e787) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Implement bb.msg.domain as a named tuple, drop the Enum classChris Larson2010-07-022-59/+21
| | | | | | | | | Also fixes some bb.msg references from within bb.msg. (Bitbake rev: db95af590f742c8186e84046ad9704fae1733720) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix an error in the ncurses UIChris Larson2010-07-021-3/+3
| | | | | | | (Bitbake rev: 90c68238cb62afa1c39e1d4fff1f418c9ec047e5) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Immediately display messages if no UI handlers are installed yetChris Larson2010-07-021-3/+12
| | | | | | | (Bitbake rev: 17c414d0c050c42d4beb3f1dd84573020aacb392) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix the task event handling in the ncurses UIChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 50b7b817d418532583da3bad62a36fcefe3637a2) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Ensure we always utilize the correct messaging domainsChris Larson2010-07-026-14/+14
| | | | | | | (Bitbake rev: 92a2e2e90981c0615171abe03645a772d84f6986) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bb.event: NotHandled and Handled are on the way outChris Larson2010-07-021-2/+6
| | | | | | | (Bitbake rev: ed35b30f8e09b0bfc15102fa6483c55d6b7d61de) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Rename the finalise method for consistencyChris Larson2010-07-021-4/+4
| | | | | | | | | Apparently the finalise spelling is becoming less common in British English. (Bitbake rev: 47449b2fc433e5725839ca4f7e9bca931a475838) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move update_data into the DataSmart class as a finalize() methodChris Larson2010-07-022-136/+67
| | | | | | | (Bitbake rev: ff801397785567cb84b3615de86bff764d65decf) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop doctest, as we aren't utilizing itChris Larson2010-07-021-33/+0
| | | | | | | | | | | We should add back in some proper unit testing. Doctest is rather limited, and we haven't actually made use of it since the original implementation of the datastore when the project started, as far as I'm aware. (Bitbake rev: 3a11c2807972bbbddffde2fa67fc380d159da467) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Made '-b' work with BBCLASSEXTENDEnrico Scholz2010-07-022-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | When BBCLASSEXTEND is set, '-b' builds usually failed with messages like | ERROR: Parsing error data_fn virtual:native:<recipe>.bb and fn <recipe>.bb don't match | | File ".../bb/providers.py", line 47, in sortPriorities | priority = dataCache.bbfile_priority[f] | KeyError: 'virtual:native:<recipe>.bb' This patch fixes it and allows to specify the alternative class in a way like | ./bitbake -b virtual:native:<recipe>.bb This patch was written to be so minimal as possible; variables should be probably renamed to reflect their new meaning. (Bitbake rev: f1c7fe9fc12161ceb3fe201cde370b929b208729) Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Resurrect the old bb.vercmp as bb.utils.vercmp, and its depsChris Larson2010-07-022-1/+144
| | | | | | | | | | This is just for compatibility. We may drop it in the future, or rewrite it, as it's not particularly pythonic. (Bitbake rev: c4e31d7fe1d15a1e3ef2a453e7c7812d403d22cb) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Pass the config metadata into the Cache constructor rather than the cookerChris Larson2010-07-021-4/+4
| | | | | | | | | Cache only uses the config metadata from the cooker, no need for the cooker itself. (Bitbake rev: bf58d43444642d31293a341ce72292003ca5c162) Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Resurrect merged anonfunc executionChris Larson2010-07-021-4/+9
| | | | | | | (Bitbake rev: 0c2ed40277e157406ea25c858f14c3cebb73c21b) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Add & utilize a simple_exec utility functionChris Larson2010-07-022-1/+4
| | | | | | | (Bitbake rev: 5ead16f14f996bcbb2fb14277b8ce5a9317b8160) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Consolidate the exec/eval bits, switch anonfunc to better_exec, etcChris Larson2010-07-026-53/+36
| | | | | | | | | | | | The methodpool, ${@} expansions, anonymous python functions, event handlers now all run with the same global context, ensuring a consistent environment for them. Added a bb.utils.better_eval function which does an eval() with the same globals as better_exec. (Bitbake rev: 424d7e267b009cc19b8503eadab782736d9597d0) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Pass an empty locals dict in expansion, since list comprehensions apparently ↵Chris Larson2010-07-021-2/+2
| | | | | | | | | leak their '_' helper variable (Bitbake rev: 97da0cebbaf4dd1b46e58bd2e80cab6c007ae7c9) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Two minor changes to the way python snippet expansion happensChris Larson2010-07-021-8/+8
| | | | | | | | | | | | - Use a single dictionary for the context, both global & local, since for some reason it chokes wanting a global "d" rather than a local in the metadata. - First compile the string into a code object before running eval, so we can include the variable name in an evaluation error. (Bitbake rev: 49534d928a37e0804ca84eed186cd22363023b2e) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: providers.py: Fix typoRichard Purdie2010-07-011-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Add bb.utils.join_deps to handle creation of dependency strings ↵Richard Purdie2010-06-301-0/+12
| | | | | | with versions Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Move the logger initialization from cooker to utilsJeff Dike2010-06-292-11/+16
| | | | | | | | | | | | | | In order to move the environment cleaning, which wants to log a message, before cooker creation, the logging facility initialization needs to happen earlier. So, it is now in init_logger in utils.py and called from bitbake before the creation of the data object. It also seems more correct to initialize a global facility like this from a more global context than the creation of an object, of which there could theoretically be many. Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: allow fakeroot functionality to be provided by an alternative programJoshua Lock2010-06-251-1/+1
| | | | | | | If the variable FAKEROOT is set its value will be used, otherwise we default to fakeroot. Signed-off-by: Joshua Lock <josh@linux.intel.com>
* bitbake decodeurl: fix the file:// url handlingNitin A Kamble2010-06-071-1/+4
| | | | | | | | | | | Without this patch decoding a url of this kind file://dir/filename gives path=/filename host=dir. With the patch it decodes as path=/dir/filename host="" Probably nobody stumbled on this issue yet because nobody used file:// urls with directory names in the path. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
* bitbake/event.py: Run class eventhandlers in the task context but ensure UI ↵Richard Purdie2010-03-251-8/+17
| | | | | | handlers run in the server context Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/cooker.py: Finishing the command needs to happen after the ↵Richard Purdie2010-03-251-2/+2
| | | | | | BuildCompleted event else the cooker can shutdown first Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* cache.py: Bump the cache version after the BBVERSIONS updateRichard Purdie2010-03-251-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bb.manifest: Drop, its unused and obsolete. No point in having dead code aroundRichard Purdie2010-03-251-144/+0
| | | | | | (Bitbake rev: 69374497b557a5e99ffc7cbe5e075d63e2d9cfaa) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* BBFILES: use a set to remove duplicates when collecting.Chris Larson2010-03-251-4/+4
| | | | | | | (Bitbake rev: b1b06133da4ca379a60775552d481f7fbf77e999) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bb/command was importing bb and accessing some of its own classes indirectly ↵Chris Larson2010-03-251-3/+5
| | | | | | | | | as bb.command.<class> (Bitbake rev: 4b2a268ce8dad63d21619c1b9acc1de86d222d93) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Why is bb/__init__.py importing bb?Chris Larson2010-03-251-1/+2
| | | | | | | (Bitbake rev: 3eb01a20cbbb2e7a2f6278089bcc9bb70021738f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* data_smart: be explicit about what we make available to eval'd python codeChris Larson2010-03-251-2/+7
| | | | | | | (Bitbake rev: 6a73dda60f50e9b3e5513795d1ec7207d1446de2) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Fix 7 references to undefined variables, as spotted by pyflakesChris Larson2010-03-254-8/+7
| | | | | | | (Bitbake rev: e1e4ccf203e38070eeafd31a622671996cff61a1) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bb.utils: remove old portage remnantsChris Larson2010-03-252-588/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The following utility functions were removed. Note that in this particular case we're bypassing a proper deprecation process, as these functions are clearly not utilized, are obvious remnants of old ways of doing things, and some of which do not even function properly. - tokenize - evaluate - flatten - relparse - ververify - isjustname - isspecific - catpkgsplit - pkgsplit - pkgcmp - dep_parenreduce - dep_opconvert (Bitbake rev: 62983ad9b151ee8d51e8cf9a31c736c7813edf16) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bb.utils: utilize string.letters and string.digitsChris Larson2010-03-251-5/+3
| | | | | | | (Bitbake rev: 7af05cba87ec9f3ea5e53689b3d9f0a63784d1b5) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>