summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/persist_data.py
Commit message (Collapse)AuthorAgeFilesLines
* persist_data: survive if sqlite3 couldn't enable the shared cacheChristopher Larson2012-02-221-1/+4
| | | | | | | (Bitbake rev: e870fd57bb84a17a871a5b5de3bf5202fe9b135f) Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/persist_data: Reconnect when DB is lockedLianhao Lu2012-01-191-5/+7
| | | | | | | | | | | [YOCTO #1761] Reconnect to the backend Sqlite DB in 'database is locked' exception so the timeout can be leveraged in each time retry. (Bitbake rev: b310382764367b573c84f33d847c6eb821266f9e) Signed-off-by: Lianhao Lu <lianhao.lu@intel.com> 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-3/+3
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake/persist_data: Sync file with upstream bitbakeRichard Purdie2011-05-061-12/+24
| | | | Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* persist_data: implement comparison, same as dictChris Larson2011-05-061-31/+17
| | | | | | | (Bitbake rev: 1190406c526c7bb7cf415867be83e0403812a7dd) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* persist_data: don't allow non-string keys/valuesChris Larson2011-05-061-0/+5
| | | | | | | (Bitbake rev: 28958cd55e592853c68f5f2ba79381d1b8dcfb8f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* persist_data: add has_keyChris Larson2011-05-061-0/+3
| | | | | | | (Bitbake rev: 7942833ca0685cf4f3b243dde6203499ef97420c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* persist_data: raise KeyError on missing elementsChris Larson2011-05-061-0/+3
| | | | | | | (Bitbake rev: a4f62433845c29f98c6a9746d5d2847bf9506ea5) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* Initial work on getting bitbake working under pypyChris Larson2011-05-061-0/+2
| | | | | | | | | | | - use os.chmod, not os.fchmod, as the latter is missing under pypy - rearrange our imports a bit - don't die if sqlite3 is missing shared cache support (Bitbake rev: f229824dc9c453adf6067500e2bf6761536e4f2f) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* persist_data: kill unreachable break lineChris Larson2011-02-101-1/+0
| | | | | | | (Bitbake rev: 7486b38603f2766adaf976a9f95e9276c83abe31) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* persist_data: loop on database lock for table creationChris Larson2011-02-101-2/+2
| | | | | | | (Bitbake rev: d93fcbd64ab5d806288424170f55323b4297e7d6) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* persist_data: resurrect the lock wait for selectsChris Larson2011-01-051-7/+7
| | | | | | | | | Think this got inadvertantly dropped when switching to the new API. (Bitbake rev: 628c5159d1151b89f2b7210c8819489e8dc9a84d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Rework the persist_data APIChris Larson2011-01-051-72/+137
| | | | | | | | | | | | | | | | | | Rather than having to run .addDomain() and then .getValue(domain, key), .setValue(domain, key), etc, now it just works as mappings. As an example: setValue(domain, key) -> persist[domain][key] = value It also arranges things so we can construct objects of this type using any arbitrary filename/path for the sqlite3 database, rather than being so tightly bound to the metadata. (Bitbake rev: d9e8b8af308ae871efdc8ef0782be30af8c1f894) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Revert "persist_data: cache connection and use cursor"Chris Larson2011-01-051-8/+3
| | | | | | | | | | | | | Caching the database connection can cause serious issues if it results in multiple processes (e.g. multiple tasks) simultaneously using the same connection. This reverts commit 8a6876752b90efd81d92f0947bfc9527d8260969. (Bitbake rev: 60b9b18eafad5ac46c7cf1048d749d673c2ee0ad) 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>
* Switch bitbake internals to use logging directly rather than bb.msgChris Larson2011-01-041-2/+6
| | | | | | | | | | | | | | We use a custom Logger subclass for our loggers This logger provides: - 'debug' method which accepts a debug level - 'plain' method which bypasses log formatting - 'verbose' method which is more detail than info, but less than debug (Bitbake rev: 3b2c1fe5ca56daebb24073a9dd45723d3efd2a8d) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake/persist_data: Attempt to fix locking issuesRichard Purdie2010-08-201-8/+17
| | | | | | | | | It appears the timeout sometimes has no effect and we see database access failures. Combat this by wrapping the execute function in all cases and retrying manually ourselves. Thanks to Kevin Tian for help debugging this. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* persist_data: cache connection and use cursorBernhard Reutner-Fischer2010-07-021-8/+13
| | | | | | | | | | Store database connection to persistent database in fetcher. (Bitbake rev: 8a6876752b90efd81d92f0947bfc9527d8260969) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> 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-2/+2
| | | | | | | (Bitbake rev: d39ab776e7ceaefc8361150151cf0892dcb70d9c) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Switch some references to moved functionsChris Larson2010-07-021-1/+2
| | | | | | | (Bitbake rev: ddea2978cb969cf1381cfee5c055de0c9e56a4e3) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* Formatting cleanupsChris Larson2010-07-021-8/+5
| | | | | | | (Bitbake rev: 2caf134b43a44dad30af4fbe33033b3c58deee57) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Remove persist_data domain renaming code as it appears to expose ↵Richard Purdie2009-07-301-10/+0
| | | | | | sqlite bugs and data consistency issues Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Make sure tables exist when renamingRichard Purdie2009-07-301-0/+1
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Add renameDomain and getKeyValues functions to the persistent data codeRichard Purdie2009-07-291-0/+20
| | | | Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
* bitbake: Sync with 1.8 branchRichard Purdie2008-05-131-2/+2
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@4463 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update to 1.8.10 releaseRichard Purdie2008-01-201-1/+5
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3555 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake persist_data: Fix for python 2.4Richard Purdie2007-08-041-2/+2
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2366 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake persist_data: Fix for python 2.4Richard Purdie2007-08-041-1/+1
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2365 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake persist_data: Fix module referenceRichard Purdie2007-08-041-1/+1
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2364 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake persist_data: Add own retry logicRichard Purdie2007-08-041-5/+16
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2363 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake persist_data: Use immediate connection modeRichard Purdie2007-08-041-1/+2
| | | | git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2362 311d38ba-8fff-0310-9ca6-ca027cbcb966
* bitbake: Update along 1.8 branchRichard Purdie2007-08-031-0/+94
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2345 311d38ba-8fff-0310-9ca6-ca027cbcb966