summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/data.py
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: bitbake: Warn upon finding tab indentation in python functionsRichard Purdie2012-07-191-0/+2
| | | | | | | | | | | | Mixed spacing in python functions can cause subtle issues and generally confuses users. We've standardised on 4 space indentation, adding this warning helps ensure consistency and avoid bugs. It also makes _prepend and _append operations on python functions slightly less risky. (Bitbake rev: c51cfaf48d3b12a19b01e824b6ba4230376bcad4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: include varflags in checksumsPaul Eggleton2012-05-301-1/+19
| | | | | | | | | | | | | | | | | | | | | | Add a dependency to each variable on a filtered list of its varflags. This is intended to catch things such as SRC_URI checksums, varflags controlling extra functionality from classes (e.g. the recently updated update-alternatives class in OE-Core), etc. and ensure their values influence the sstate checksums. There is an exclusion list which needs to be set via bitbake.conf (BB_SIGNATURE_EXCLUDE_FLAGS), if this is not set then the functionality is disabled. The existing vardepsexclude mechanism can also be used to exclude undesired varflags, but they must be fully specified, e.g.: do_patch[vardepsexclude] += "do_patch[someflag]" Implements [YOCTO #2517]. (Bitbake rev: 56c1ab18fcaf4ac245dcb412ed55e8e0af07883b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* data/runqueue.py: Fix commented out test code after variable name changesRichard Purdie2012-01-271-1/+1
| | | | | | (Bitbake rev: 175c5c8a5e51365aa127562e8598e84f5cd36495) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Update users of getVar/setVar to use the data store functions directlyRichard Purdie2011-11-271-2/+2
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* data/siggen: Add vardepvalue mechanism to allow the variable dependency code ↵Richard Purdie2011-11-241-9/+14
| | | | | | | | | | | | | | | | | | | | | | | to be forced to specific values We have a problem if we want to inject specific information into the variable dependency code. There are cases for example where we want a dependency on the value of X but it doesn't matter how X was constructed or what dependencies it might have had, we only care about the absolute value. With the current code, its near enough impossible to do this. This patch adds such a mechanism so the user can trigger this with code like: baselib[vardepvalue] = "${baselib}" It also refactors some of the code so we do variable lookups once instead of doing this in two different functions. [YOCTO #1583] (Bitbake rev: 6c879b44ccf42dc73fe4467076e114700d7ba81b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* codeparser: silence non-literal warnings for vardepsChristopher Larson2011-11-101-5/+9
| | | | | | | | | | If the vardeps flag is not None, we now silence the warnings about non-literal usage for that variable. (Bitbake rev: e724b9f417d1baf898f5afc6376c73c1a2ad8db9) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* codeparser: accept a name for better messagesChristopher Larson2011-11-101-4/+4
| | | | | | | | | | | | | | | | | | | | - If a name is passed to the parser, prepend the messages with "while parsing <name>:". This gives a bit more context. - Tweak the warning messages slightly (they had to be altered anyway to inject the variable being parsed). Before: DEBUG: Warning: in call to 'bb.data.getVar': argument ''%s' % var' is \ not a literal After: DEBUG: while parsing emit_pkgdata, in call of bb.data.getVar, argument \ ''%s' % var' is not a string literal (Bitbake rev: 1060193ae4d54e667735dbff5d1d2be49a3f95c9) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Ensure only the filtered environment variables are inherited from the OSJoshua Lock2011-08-151-7/+8
| | | | | | | | | | | | | | | | | | The recent change which modified inheritFromOS to use the intial environment, rather than the current environment, introduced a bug such that variables which had been cleaned from the environment where still set in the data store. This patch changes things such that a list of approved environment variables is saved after the environment is cleaned and only the variables in this list are inherited in inheritFromOS. CC: James Limbouris <james.limbouris@gmail.com> CC: Chris Larson <clarson@kergoth.com> (Bitbake rev: cb6c07054e8baf94614713ec257c643b22266d75) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* data|cooker: use saved environment variables when calling inheritFromOSJoshua Lock2011-07-261-4/+4
| | | | | | | | | | Now that we have a pristine copy of the variables available at launch time we can use them when looking to inherit the OS's environment. (Bitbake rev: 21c21fcc5871e81d8d497b6baed605cdd74c4571) Signed-off-by: Joshua Lock <josh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* make exception handling syntax consistentScott Garman2011-06-151-1/+1
| | | | | | | | | | Update exception handling syntax to use the modern style: except ExcType as localvar (Bitbake rev: dbf5f42b06bef81749b13aa99945cc1292a6676d) Signed-off-by: Scott Garman <scott.a.garman@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/data/runqueue: Sync up with upstream to clean up environment ↵Richard Purdie2011-06-081-16/+11
| | | | | | variable handling Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/siggen.py: Fix whitelisted variable handlingRichard Purdie2011-01-121-4/+1
| | | | | | | | | Even when a variable was whitelisted, any dependencies of that variable could still creep into the task hash due to the way the whitelisting code worked. This patch changes thing to ensure that when whitelisted, that whitelisting applies to the variable and any dependencies it has. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: Sync environment handling function names and comments with upstream ↵Richard Purdie2011-01-101-1/+1
| | | | | | alterations Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/data.py: corrected the output for shell syntax.Lianhao Lu2011-01-071-1/+3
| | | | | | | | | | | [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. Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
* data: fewer newlines for (un)exportBernhard Reutner-Fischer2011-01-041-2/+2
| | | | | | | | | | | 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). (Bitbake rev: ba060160fdf1278a273fb2b77d36b8c681807ecf) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Sync a load of whitespace and other non-functionality changes with ↵Richard Purdie2011-01-041-2/+2
| | | | | | bitbake uptream Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: add optional expansion to getVarFlag()Paul Eggleton2010-12-141-2/+2
| | | | | | | | Add a parameter to getVarFlag() to auto-expand the value of the flag. This makes getVarFlag() more consistent with getVar(), and allows expansion of vardeps and vardepsexclude (which has been done in this commit). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* bitbake: allow excluding dependencies of variablesPaul Eggleton2010-12-141-0/+1
| | | | | | | | | Adds a vardepsexclude flag that can be used to exclude a dependency of a variable (the opposite of vardeps). This will allow the exclusion of variables from the hash generation much more selectively than blanket whitelisting using BB_HASHBASE_WHITELIST. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
* bitbake: Overhaul environment handlingRichard Purdie2010-12-091-1/+9
| | | | | | | | | | | | | | 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. Currently, this code only finalises the environment in he worker as doing so in the server means variables are unavailable in the worker. If we switch back to fork() calls instead of exec() this code will need revisting. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/data.py: Allow variables to suplement dependencies using the vardep flagRichard Purdie2010-09-131-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/data.py: Add emit_func() and generate_dependencies() functionsRichard Purdie2010-08-311-0/+75
| | | | | | | | These functions allow generation of dependency data between funcitons 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>
* bitbake/data.py: Handle exceptions in export_bars in the same way as emit_var()Richard Purdie2010-08-201-3/+8
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Switch to use subprocess for forking tasks and FAKEROOTENV to run ↵Richard Purdie2010-08-191-0/+9
| | | | | | shell and python under a fakeroot environment Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Don't emit vars starting with __, as those are internalChris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: 211f44ce0e15c7c419606e9ef3568d9cea6775b7) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Enhance the expansion exception messageChris Larson2010-07-021-6/+3
| | | | | | | (Bitbake rev: 1cc11164a85a5b30d6b9184cb5a8f7f7ac1aaff2) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Allow emission of non-string objects in emit_var, instead running str() on ↵Chris Larson2010-07-021-4/+2
| | | | | | | | | it first (Bitbake rev: 5b09e28cb4a2c6c99ad58e71fb803160922a7e1e) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* emit_env: clean up, iterate onceChris Larson2010-07-021-11/+7
| | | | | | | (Bitbake rev: db718ec6f67c7c0d0efb4ba0b5b24384f707dcf5) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Kill unnecessary usages of the types moduleChris Larson2010-07-021-2/+2
| | | | | | | | | | | | | types.IntType -> int types.StringType -> basestring ... Also moves our ImmutableTypes tuple into our own namespace. (Bitbake rev: 83674a3a5564ecb1f9d2c9b2d5b1eeb3c31272ab) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Apply some 2to3 transforms that don't cause issues in 2.6Chris Larson2010-07-021-1/+1
| | | | | | | (Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Drop unused bb.data.expandData functionChris Larson2010-07-021-16/+0
| | | | | | | (Bitbake rev: 188af3ef5fdb5cd86b74147bf5eafc085ac489be) Signed-off-by: Chris Larson <chris_larson@mentor.com> 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 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-021-3/+0
| | | | | | | (Bitbake rev: 5cc47a49518c69c94f8b78e9dda6d542ba17b1e8) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Formatting cleanupsChris Larson2010-07-021-18/+17
| | | | | | | (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-021-150/+13
| | | | | | | | | | | 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>
* Move update_data into the DataSmart class as a finalize() methodChris Larson2010-07-021-136/+2
| | | | | | | (Bitbake rev: ff801397785567cb84b3615de86bff764d65decf) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Move MalformedUrl, VarExpandError into appropriate modules.Chris Larson2010-03-221-0/+3
| | | | | | | (Bitbake rev: e616483b237dafff7f90ba1c09e9ee7c383a2e47) Signed-off-by: Chris Larson <clarson@kergoth.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Switch to bitbake-dev version (bitbake master upstream)Richard Purdie2010-01-201-1/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Merge further fixes from upstream 1.8 branchRichard Purdie2009-05-111-0/+2
| | | | | | | | * Make the test functionality work * Optimise BBPATH handling when changing directory * Optimise file globing for BBFILES Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Make sure existing environment variables are properly exportedRichard Purdie2009-05-091-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Refactor the environment variable handlingRobert Bradford2008-10-171-2/+0
| | | | | | | Refactor the environment variable handling so that it more closes matches the changes that have been made in bitbake-dev. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5527 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake/bitbake-dev: Allow much better control of which variable influence ↵Richard Purdie2008-09-301-15/+6
| | | | | | bitbake from the environment git-svn-id: https://svn.o-hand.com/repos/poky/trunk@5347 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake data.py: Fix unexport handling (#OE3135)Richard Purdie2007-10-221-3/+3
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2948 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with 1.8.8 releaseRichard Purdie2007-08-201-0/+7
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2513 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with 1.8 head. Adds locking to the fetcher to prevent parallel ↵Richard Purdie2007-08-161-18/+15
| | | | | | downloads, fixes key expansion issues and occasional missing dependency graph links git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2502 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with upstream 1.8 branch for fixesRichard Purdie2007-08-121-0/+4
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2484 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update along 1.8 branchRichard Purdie2007-08-031-17/+23
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2345 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with upstream. Richard Purdie2007-01-081-19/+18
| | | | | | | | | | | | | * File licence headers were sanitised causing most of the diff. * cooker.py was created from bin/bitbake. * cvs fetcher port option was added * The -f force option was fixed to work correctly * Multiple entries in rrecrdeps are now handled correctly (allows adding do_deploy to image depends) git-svn-id: https://svn.o-hand.com/repos/poky/trunk@1129 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Sync with bitbake trunk for bugfixes and improved dot file ↵Richard Purdie2006-11-291-2/+2
| | | | | | generation code git-svn-id: https://svn.o-hand.com/repos/poky/trunk@987 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake/lib/bb/data.py: Add unexport flag for variables, add speedup for ↵Richard Purdie2006-11-251-0/+6
| | | | | | expandKeys git-svn-id: https://svn.o-hand.com/repos/poky/trunk@956 311d38ba-8fff-0310-9ca6-ca027cbcb966