aboutsummaryrefslogtreecommitdiffstats
path: root/lib/bb/utils.py
AgeCommit message (Collapse)Author
2010-04-12Kill unnecessary usages of the types moduleChris Larson
types.IntType -> int types.StringType -> basestring ... Also moves our ImmutableTypes tuple into our own namespace. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-11Apply some 2to3 transforms that don't cause issues in 2.6Chris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Apply the 2to3 print function transformChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Drop some unused varsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Import fixupsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Formatting cleanupsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Implement bb.msg.domain as a named tuple, drop the Enum classChris Larson
Also fixes some bb.msg references from within bb.msg. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Ensure we always utilize the correct messaging domainsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Drop doctest, as we aren't utilizing itChris Larson
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. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-06Resurrect the old bb.vercmp as bb.utils.vercmp, and its depsChris Larson
This is just for compatibility. We may drop it in the future, or rewrite it, as it's not particularly pythonic. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-03-31Add & utilize a simple_exec utility functionChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-03-30Consolidate the exec/eval bits, switch anonfunc to better_exec, etcChris Larson
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. Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-03-24Fix 7 references to undefined variables, as spotted by pyflakesChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-03-24bb.utils: remove old portage remnantsChris Larson
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 Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-03-24bb.utils: utilize string.letters and string.digitsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-03-24bb.which: fix broken direction/reverse argumentChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-03-23utils: improve wording of error messageBernhard Reutner-Fischer
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Chris Larson <clarson@kergoth.com>
2010-02-19Fix msg usage in the moved utility functions.Chris Larson
Signed-off-by: Chris Larson <clarson@kergoth.com>
2010-02-19Move most utility functions from bb into bb.utils.Chris Larson
Signed-off-by: Chris Larson <clarson@kergoth.com>
2010-02-15utils.py: Don't error if an exported environment variable is unset (i.e. None)Richard Purdie
(From Poky rev: 62c103ce0e154ee5bf6183987adc90fc6df154c6) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-01-19taskdata: Improve error message if incorrectly formatted tasks are found ↵Richard Purdie
(from poky) Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-11-08utils.py: add special handling for version delimitersDenys Dmytriyenko
Make version comparison work properly for pre-releases and release-candidates, when there is an extra suffix in the field, such as: PV = "2.6.29+2.6.30-rc5-${PR}+gitr${SRCREV}" More details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/26691 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
2009-07-23utils.py: Add build_environment function (from Poky)Richard Purdie
Add a function to bring the command environment in sync with the data dictonary. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2009-01-02utils.py: Add bb.utils.prune_suffix functionRichard Purdie
2008-12-06Pass around the tasks to execute rather than using magic variables. Also use ↵Richard Purdie
the empty_environment() function to clear the environment
2008-12-06utils.py: Add clean_environment() function and call where appropriate (from ↵Richard Purdie
Poky)
2008-12-06utils.py: Improve lock file function error handling (from Poky)Richard Purdie
2008-10-08[bb.utils] Make prunedir cope with symlinks to directoriesHolger Hans Peter Freyther
2008-10-07 Julian Chu <Julian_Chu@openmoko.com> Reviewed by Holger. The packagekit git repository contains a symlink and on fetching the pruning failed as "packagekit" is not a directory but a symlink to a directory. * lib/bb/utils.py:
2008-09-30utils.py: Fix error message (from Joshua Lock)Richard Purdie
2008-09-30bin/bitbake: Add better environmental variable handling. By default it will ↵Richard Purdie
now only pass certain whitelisted variables into the data store. If BB_PRESERVE_ENV is set bitbake will use all variable from the environment. If BB_ENV_WHITELIST is set, that whitelist will be used instead of the internal bitbake one. Alternatively, BB_ENV_EXTRAWHITE can be used to extend the internal whitelist.
2008-09-30utils.py: Move prunedir function to utils.py and add explode_dep_versions ↵Richard Purdie
function
2008-05-12utils.py: Add md5 and sha256 checksum generation functions from Ross Burton ↵Richard Purdie
(via Poky)
2008-04-06utils.py: Improve compile/execute error messagesRichard Purdie
2008-02-26utils.py: Tweak explode_deps function to remove unused manipulationRichard Purdie
2008-01-06fetchers: Properly raise errors for invalid source URI protocols (from ↵Richard Purdie
poky). utils.py: Fix a spelling mistake.
2007-11-24Add bb.utils.lockfile() and bb.utils.unlockfile() from Poky. Use these ↵Richard Purdie
functions in the fetcher code
2007-03-24Fix PE handling to use strings and update showVersions to add PE support ↵Richard Purdie
(closes #2027)
2007-03-19Add PE (Package Epoch) support from Philipp Zabel (pH5)Richard Purdie
2006-12-08Add proper GPLv2 headers to all BitBake filesHolger Hans Peter Freyther
BitBake trunk is now GPLv2 only, no mix of MIT,FreeBSD License is left. Update GPL headers to point to the correct address of the FSF Update the list of authors. Uli Luckas, Seb Frankengul and Tim Amsell contributed to the sourcecode as well
2006-09-09Complete conversion to use bb.msgRichard Purdie
2006-07-08bitbake/lib/bb/__init__.py:Richard Purdie
bitbake/lib/bb/build.py: bitbake/lib/bb/utils.py: bitbake/lib/bb/shell.py: bitbake/lib/bb/providers.py: bitbake/lib/bb/msg.py: bitbake/bin/bitbake: bitbake/bin/bitdoc: bitbake/classes/base.bbclass: Start an overhaul of the message handling in bitbake: - Introduce a new msg module to replace the existing simple calls. - The msg module adds the conncept of message domains so ultimately we can select which kinds of debug messages we want to see (it uses an Enum class for this) - Add a warn logging level for things the user should really pay attention to as note is a little overloaded at present - Start converting to use the new fuctions
2006-03-08lib/bb/utils.py:Holger Hans Peter Freyther
Do not report RuntimeErrors for SkipPackage and FuncFailed
2006-03-08bitbake/lib/bb/utils.py:Holger Hans Peter Freyther
Kill the code duplication
2006-03-08lib/bb/utils.py:Holger Hans Peter Freyther
Do not go past the buffer (this looks like copy and paste)
2006-03-08bitbake/lib/bb/utils.py:Holger Hans Peter Freyther
Do not report Skipped Packages as runtime error
2006-03-07lib/bb/utils.py:Holger Hans Peter Freyther
-Be less verbose
2006-03-07bitbake/lib/bb/utils.py:Holger Hans Peter Freyther
-This not Thiis -Print the RuntimeError with context gosh that is looking awesome. -Now debugging errors in custom bbclasses, python methods should be much more easy
2006-03-07bitbake/lib/bb/utils.py:Holger Hans Peter Freyther
Create a work in progress version for better_execute. With advanced error reporting facilities. bitbake/lib/bb/build.py: Use better_execute bitbake/parse/parse_py/BBHandler.py: Use better_execute instead of exex
2006-02-26bitbake/parser,build,utils:Holger Hans Peter Freyther
We compile strings into code. In case of erros the traceback is not useful at all. It doesn't print the function name, accurate line number etc. Introduce a better_compile method that excepts the Error and prints the surrounding lines of code. We make use of it on the parsing level and execution level of python methods.
2006-02-21bitbake/lib/bb/utils.py:Richard Purdie
- Fix a RDEPENDS parsing bug in utils:explode_deps() (versions containing spaces didn't parse correctly) bitbake/lib/bb/fetch/git.py: - Update git fetcher behaviour to match git changes