diff options
author | Chris Larson <chris_larson@mentor.com> | 2010-11-18 19:51:51 -0700 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2011-01-05 00:58:23 +0000 |
commit | 3069c0b2588c9e88a4fa2fd4d37356410d364410 (patch) | |
tree | e0f101e24b50feb9c014c8d3ed98baf62b915467 /bitbake/lib/bb/fetch | |
parent | 30d27115ec38b8191d81504858d105b0d91277d8 (diff) | |
download | poky-3069c0b2588c9e88a4fa2fd4d37356410d364410.tar.gz |
Revert "persist_data: cache connection and use cursor"
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>
Diffstat (limited to 'bitbake/lib/bb/fetch')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index 668b788698..d8f5f167fc 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -144,14 +144,13 @@ def uri_replace(uri, uri_find, uri_replace, d): | |||
144 | methods = [] | 144 | methods = [] |
145 | urldata_cache = {} | 145 | urldata_cache = {} |
146 | saved_headrevs = {} | 146 | saved_headrevs = {} |
147 | persistent_database_connection = {} | ||
148 | 147 | ||
149 | def fetcher_init(d): | 148 | def fetcher_init(d): |
150 | """ | 149 | """ |
151 | Called to initialize the fetchers once the configuration data is known. | 150 | Called to initialize the fetchers once the configuration data is known. |
152 | Calls before this must not hit the cache. | 151 | Calls before this must not hit the cache. |
153 | """ | 152 | """ |
154 | pd = persist_data.PersistData(d, persistent_database_connection) | 153 | pd = persist_data.PersistData(d) |
155 | # When to drop SCM head revisions controlled by user policy | 154 | # When to drop SCM head revisions controlled by user policy |
156 | srcrev_policy = bb.data.getVar('BB_SRCREV_POLICY', d, 1) or "clear" | 155 | srcrev_policy = bb.data.getVar('BB_SRCREV_POLICY', d, 1) or "clear" |
157 | if srcrev_policy == "cache": | 156 | if srcrev_policy == "cache": |
@@ -180,7 +179,7 @@ def fetcher_compare_revisions(d): | |||
180 | return true/false on whether they've changed. | 179 | return true/false on whether they've changed. |
181 | """ | 180 | """ |
182 | 181 | ||
183 | pd = persist_data.PersistData(d, persistent_database_connection) | 182 | pd = persist_data.PersistData(d) |
184 | data = pd.getKeyValues("BB_URI_HEADREVS") | 183 | data = pd.getKeyValues("BB_URI_HEADREVS") |
185 | data2 = bb.fetch.saved_headrevs | 184 | data2 = bb.fetch.saved_headrevs |
186 | 185 | ||
@@ -758,7 +757,7 @@ class Fetch(object): | |||
758 | if not hasattr(self, "_latest_revision"): | 757 | if not hasattr(self, "_latest_revision"): |
759 | raise ParameterError | 758 | raise ParameterError |
760 | 759 | ||
761 | pd = persist_data.PersistData(d, persistent_database_connection) | 760 | pd = persist_data.PersistData(d) |
762 | key = self.generate_revision_key(url, ud, d) | 761 | key = self.generate_revision_key(url, ud, d) |
763 | rev = pd.getValue("BB_URI_HEADREVS", key) | 762 | rev = pd.getValue("BB_URI_HEADREVS", key) |
764 | if rev != None: | 763 | if rev != None: |
@@ -775,7 +774,7 @@ class Fetch(object): | |||
775 | if hasattr(self, "_sortable_revision"): | 774 | if hasattr(self, "_sortable_revision"): |
776 | return self._sortable_revision(url, ud, d) | 775 | return self._sortable_revision(url, ud, d) |
777 | 776 | ||
778 | pd = persist_data.PersistData(d, persistent_database_connection) | 777 | pd = persist_data.PersistData(d) |
779 | key = self.generate_revision_key(url, ud, d) | 778 | key = self.generate_revision_key(url, ud, d) |
780 | 779 | ||
781 | latest_rev = self._build_revision(url, ud, d) | 780 | latest_rev = self._build_revision(url, ud, d) |