diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2009-07-30 21:24:31 +0100 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-07-30 21:24:31 +0100 |
commit | 433c2d2318dc32843fb1f92487977d2152b72818 (patch) | |
tree | 5abf3379d4b43e9e74b2a3001428ab8c7d71e068 /bitbake/lib | |
parent | ef9c095334632b8576667800d52b842f1cbf52ea (diff) | |
download | poky-433c2d2318dc32843fb1f92487977d2152b72818.tar.gz |
bitbake: Remove persist_data domain renaming code as it appears to expose sqlite bugs and data consistency issues
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib')
-rw-r--r-- | bitbake/lib/bb/fetch/__init__.py | 10 | ||||
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 10 |
2 files changed, 7 insertions, 13 deletions
diff --git a/bitbake/lib/bb/fetch/__init__.py b/bitbake/lib/bb/fetch/__init__.py index a97138d271..368e9e78c1 100644 --- a/bitbake/lib/bb/fetch/__init__.py +++ b/bitbake/lib/bb/fetch/__init__.py | |||
@@ -84,6 +84,7 @@ def uri_replace(uri, uri_find, uri_replace, d): | |||
84 | 84 | ||
85 | methods = [] | 85 | methods = [] |
86 | urldata_cache = {} | 86 | urldata_cache = {} |
87 | saved_headrevs = {} | ||
87 | 88 | ||
88 | def fetcher_init(d): | 89 | def fetcher_init(d): |
89 | """ | 90 | """ |
@@ -97,12 +98,15 @@ def fetcher_init(d): | |||
97 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Keeping SRCREV cache due to cache policy of: %s" % srcrev_policy) | 98 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Keeping SRCREV cache due to cache policy of: %s" % srcrev_policy) |
98 | elif srcrev_policy == "clear": | 99 | elif srcrev_policy == "clear": |
99 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Clearing SRCREV cache due to cache policy of: %s" % srcrev_policy) | 100 | bb.msg.debug(1, bb.msg.domain.Fetcher, "Clearing SRCREV cache due to cache policy of: %s" % srcrev_policy) |
100 | pd.renameDomain("BB_URI_HEADREVS", "BB_URI_HEADREVS_PREVIOUS") | 101 | try: |
102 | bb.fetch.saved_headrevs = pd.getKeyValues("BB_URI_HEADREVS") | ||
103 | except: | ||
104 | pass | ||
105 | pd.delDomain("BB_URI_HEADREVS") | ||
101 | else: | 106 | else: |
102 | bb.msg.fatal(bb.msg.domain.Fetcher, "Invalid SRCREV cache policy of: %s" % srcrev_policy) | 107 | bb.msg.fatal(bb.msg.domain.Fetcher, "Invalid SRCREV cache policy of: %s" % srcrev_policy) |
103 | # Make sure our domains exist | 108 | # Make sure our domains exist |
104 | pd.addDomain("BB_URI_HEADREVS") | 109 | pd.addDomain("BB_URI_HEADREVS") |
105 | pd.addDomain("BB_URI_HEADREVS_PREVIOUS") | ||
106 | pd.addDomain("BB_URI_LOCALCOUNT") | 110 | pd.addDomain("BB_URI_LOCALCOUNT") |
107 | 111 | ||
108 | def fetcher_compare_revisons(d): | 112 | def fetcher_compare_revisons(d): |
@@ -113,7 +117,7 @@ def fetcher_compare_revisons(d): | |||
113 | 117 | ||
114 | pd = persist_data.PersistData(d) | 118 | pd = persist_data.PersistData(d) |
115 | data = pd.getKeyValues("BB_URI_HEADREVS") | 119 | data = pd.getKeyValues("BB_URI_HEADREVS") |
116 | data2 = pd.getKeyValues("BB_URI_HEADREVS_PREVIOUS") | 120 | data2 = bb.fetch.saved_headrevs |
117 | 121 | ||
118 | changed = False | 122 | changed = False |
119 | for key in data: | 123 | for key in data: |
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index 1d60a0a139..bc4045fe85 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py | |||
@@ -69,16 +69,6 @@ class PersistData: | |||
69 | """ | 69 | """ |
70 | self.connection.execute("DROP TABLE IF EXISTS %s;" % domain) | 70 | self.connection.execute("DROP TABLE IF EXISTS %s;" % domain) |
71 | 71 | ||
72 | |||
73 | def renameDomain(self, domain, newdomain): | ||
74 | """ | ||
75 | Renames a domain, removing the target if it already exists | ||
76 | """ | ||
77 | |||
78 | self.connection.execute("DROP TABLE IF EXISTS %s;" % newdomain) | ||
79 | self.addDomain(domain) | ||
80 | self.connection.execute("ALTER TABLE %s RENAME TO %s;" % (domain, newdomain)) | ||
81 | |||
82 | def getKeyValues(self, domain): | 72 | def getKeyValues(self, domain): |
83 | """ | 73 | """ |
84 | Return a list of key + value pairs for a domain | 74 | Return a list of key + value pairs for a domain |