Age | Commit message (Collapse) | Author |
|
These imports were from python 2.6 and earlier, 2.4 in some cases.
Drop them since we're all python3 now.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
getVar() now defaults to expanding by default, thus remove the True
option from getVar() calls with a regex search and replace.
Search made with the following regex: getVar ?\(( ?[^,()]*), True\)
Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Revision d0f904d407f57998419bd9c305ce53e5eaa36b24 accidentally broke
items() and values() and made them cause stack overflows. Undo that
breakage.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Various misc changes to convert bitbake to python3 which don't warrant
separation into separate commits.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Python 2's sqlite3 module defaults to returning Unicode strings for SQL
text queries, which could trickle down to other parts of bitbake code and
cause unexpected Unicode conversions. Using byte strings avoids this issue.
For example, the git fetcher's AUTOREV support caches HEAD SHA1's using
bb.persist_data, so sometimes the git command strings passed to fetch2's
runfetchcmd() were unicode, potentially causing UnicodeDecodeErrors when
it appended the values of environment variables containing non-ASCII chars.
[YOCTO #9382]
Signed-off-by: Daniel Klauer <daniel.klauer@gin.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
If the power were to fail, it doesn't matter to us much if the data
makes it to disk or not, we'd have other problems. However an fsync()
call on a multi build autobuilder is painful so lets avoid them.
This is particularly true in this case if a timeout causes a reconnect
during a build.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
- one can use get_by_pattern to get a list of values associated
with keys that match the specified pattern
Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Christopher Larson <kergoth@gmail.com>
|
|
[YOCTO #1761]
Reconnect to the backend Sqlite DB in 'database is locked' exception so
the timeout can be leveraged in each time retry.
Signed-off-by: Lianhao Lu <lianhao.lu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
(From Poky rev: affd0907253387cee0ba0c7e9f92bcc109895446)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
This can be used for more control over the underlying transactions. Unlike
the context manager of, say, a file object, we can still use the object even
after the end of a given with block, as the context manager exit only ensures
we've committed to the database, not that we have closed the database.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
- 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
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
We'll be skipping the Pending Deprecation step given our release process.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
The common case (if not the only case) is to only use a single domain. The
only reason SQLData exists is to make it easier to delete a domain. Yet,
there's no need for us to delete a domain if SQLTable knows how to clear
itself out. So, add clear() to the table and pass the domain to persist().
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Think this got inadvertantly dropped when switching to the new API.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
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.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
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.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Parallel processes interacting with the persist_data db can quite easily
explode without this.
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
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
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Store database connection to persistent database in fetcher.
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
Signed-off-by: Chris Larson <chris_larson@mentor.com>
|
|
have changed since bitbake was last run (from Poky)
Signed-off-by: Richard Purdie <rpurdie@rpsys.net>
|
|
If PERSISTENT_DIR is used wiping the tmpdir will not wipe the PersistData
which sometines is wanted (e.g. for git SRCREVs).
Acked-By: Richard
|
|
|
|
|
|
the connection lock timeout
|
|
|
|
|