summaryrefslogtreecommitdiffstats
path: root/lib/bb/data.py
AgeCommit message (Collapse)Author
2011-01-07Merge branch 'poky-sync'Chris Larson
* poky-sync: build: kill unneeded environment setup bits parse: save python functions into the metadata Include exported variables in task process env runqueue: start implementing quieterrors Overhaul environment handling runqueue: resurrect use of file objects for pipein/pipeout runqueue: clean up message log levels runqueue: use correct task ID when checking validity of setscene tasks Add support for 'noexec' tasks runqueue: implement cache checking from metadata runqueue: pass task hash information to tasks runqueue: avoid unnecessary delays Implement task signatures data: Add emit_func and generate_dependencies codeparser: Implement persistent cache data_smart: track variable references codeparser: add module for parsing shell/python runqueue: implement scenequeue fetch: add SRC_URI checksum Signed-off-by: Chris Larson <chris_larson@mentor.com>
2011-01-07bitbake/data.py: corrected the output for shell syntax.Lianhao Lu
[BUGID# 645], modify the emit_var() 1. Added "#" to the beginning of each line if the comment contains multiple lines. 2. Added "\" to the end of each line if the shell variable value contains multiple lines. (From Poky rev: 6f454c10bcdd5) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-01-04data: fewer newlines for (un)exportBernhard Reutner-Fischer
Previously we emitted two newlines for export and unexport. One newline for export and unexport is enough (and makes the scripts look better and a tad smaller). Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-12-30Include exported variables in task process envChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-12-29Overhaul environment handlingRichard Purdie
Currently, anything whitelisted in the environment makes it into the worker processes. This is undesireable and the worker environment should be as clean as possible. This patch adapts bitbake sosme variables are loaded into bitbake's datastore but not exported by default. Any variable can be exported by setting its export flag. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com> Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-12-29data: Add emit_func and generate_dependenciesRichard Purdie
These functions allow generation of dependency data between functions and variables allowing moves to be made towards generating checksums and allowing use of the dependency information in other parts of bitbake. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
2010-05-21Don't emit vars starting with __, as those are internalChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-20Enhance the expansion exception messageChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-20Allow emission of non-string objects in emit_var, instead running str() on ↵Chris Larson
it first Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-20emit_env: clean up, iterate onceChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
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-11Drop unused bb.data.expandData functionChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Add some missing docstringsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Drop some unused functionsChris Larson
Signed-off-by: Chris Larson <chris_larson@mentor.com>
2010-04-09Drop some unused classesChris 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-09Move update_data into the DataSmart class as a finalize() methodChris 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-02-19Move MalformedUrl, VarExpandError into appropriate modules.Chris Larson
Signed-off-by: Chris Larson <clarson@kergoth.com>
2009-05-11data.py: Make sure allowed variables inherited from the environment are ↵Richard Purdie
exported again (from Poky) shell.py: When running a stage task in bbshell, run populate_staging, not the stage task (from Poky)
2009-05-11[bb] Remove unused imports reported by pyflakesHolger Hans Peter Freyther
2009-05-11[bb] Fix the tests by setting a debug level at startHolger Hans Peter Freyther
In preparation for python3.0 make sure our test cases are working again.
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-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.
2007-10-22data.py: Fix unexport handling (#3135)Richard Purdie
2007-08-17data.py: Split expandKeys into two for loops to benefit from the ↵Richard Purdie
expand_cache (12% speedup)
2007-08-15data/data_smart.py: Add data.renameVar()Richard Purdie
2007-08-13data.py: Comment last accidental commitRichard Purdie
2007-08-13cooker.py: Start UI merge: Cleanup exit status handling and collect exit ↵Richard Purdie
calls into one place. Move buildSetVars() function calls. Cleanup whitespace. Make some of the core functions more generic.
2007-07-31data.emit_var() - only call getVar if we need the variableRichard Purdie
2007-01-04drop shebangs from lib/bb scriptsMarcin Juszkiewicz
- those scripts are not called by hand by bitbake users and most of package linting tools (lintian/Debian, rpmlint/Fedora) complain about not executable scripts. - if someone want to run them by hand then he will be able to do it with calling 'python SCRIPT'
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-11-25data.py: Revert inherits_class change - merge error :-(Richard Purdie
2006-11-25data.py: Fix inherits_class() so it doesn't split lists. Add unexport ↵Richard Purdie
handling to emit_env.
2006-11-18Hack to avoid 3 million key expansions by a simple string matchHolger Hans Peter Freyther
2006-11-17Micro-Optimisation for parsing. Do not join and split the inherit_cache over ↵Holger Hans Peter Freyther
and over again
2006-11-10data.py: Fix emit_env() to expand keynames as well as valuesRichard Purdie
2006-09-09Complete conversion to use bb.msgRichard Purdie
2006-05-27 bitbake/lib/bb/data.py:Holger Hans Peter Freyther
Add another testcase regarding createCopy and update_data
2006-04-28 bitbake/lib/bb/data_smart.py:Holger Hans Peter Freyther
Remove my broken COW version, use mithros COW module instead. Make it 'work' with the code bitbake/lib/bb/data.py: Update to use the iter protocol again and has_key
2006-04-20bitbake/lib/bb:Holger Hans Peter Freyther
Make the Cookie Monster Dict a METACLASS? To exploit automatically the COW features... Small performance analysis is showing that this is saving some time (and memory as well)
2006-04-16Revert r444 as it is giving errors with keys...Holger Hans Peter Freyther
2006-04-16bitbake/lib/bb/data_smart.py:Holger Hans Peter Freyther
My first failed attempt to create something compatible with a Dictionary with COW/parenting features Use this new class for the Override Helpers bitbake/lib/bb/data.py: Update to the new data structure, it can't be treated as a dict, it is not a dict. We will use keys() (O(n)) and get
2006-04-15bitbake/lib/bb/data.py:Holger Hans Peter Freyther
-Remove the 'Proxies' for the pkgdata Cache -Remove the pkgdata() method as we now have a different caching strategy -Alter init_db to only take a parent and call createCopy directly bitbake/lib/bb/data_smart.py: -Remove the DataSmartPackage class as it is not needed bitbake/lib/bb/cache.py: -Call init_db with the only reasonable argument
2006-04-15bitbake/lib/bb/data.py:Richard Purdie
bitbake/lib/bb/__init__.py: bitbake/lib/bb/data_smart.py: bitbake/lib/bb/cache.py: bitbake/lib/bb/shell.py: bitbake/bin/bitbake: * Major cache refactoring. Change the cache to store only the data bitbake needs for dependency calculations instead of all the metadata. * Separate the cache code into its own file. * Update the rest of the code to work with the cache changes. * Temporarily break the shell's poke command.
2006-03-29bitbake/lib/bb/data.py:Holger Hans Peter Freyther
-Only have one expand method in the dict implementation. -Apply some magic knowledge by feeding the cookie master. -Speed up update_data by asking the Cookie Monster for help. We do not iterate over each key, but the keys we know that have the data we care about. This gives a huge speed improvement to parsing. bitbake/lib/bb/data_smart.py: -Make setVar more expensive by feeding the cookie monster
2006-03-05bitbake/bin/bitbake:Holger Hans Peter Freyther
Prepend the lib module instead of appending to override the system installation bitbake/lib/bb/data.py: Same as above, prepend instead of append
2006-02-26lib/bb/data.py:Holger Hans Peter Freyther
Document the weird semantic of the setVarFlags. It behaves more like an addVarFlags call. Existing variables are not going to be removed.
2005-08-04bitbake/lib/bb/data.py:Holger Hans Peter Freyther
-Pass the configuration to the persistent data instance