diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-09 21:20:42 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2021-09-10 09:26:04 +0100 |
commit | 81f47730b3fdc9cc996b80c7c5482c00d27a848a (patch) | |
tree | a2c386eee222ffde65b99c2f7024c7523e496a75 /bitbake | |
parent | 855334b0f7e2d0a79eb4b9fbbaa1dcaad5a8d5ee (diff) | |
download | poky-81f47730b3fdc9cc996b80c7c5482c00d27a848a.tar.gz |
bitbake: persist_data: Drop deprecated/unused function
This class has long since been deprecated and is unused, drop it. I'd love
to get rid of the rest of persist_data but it is still used by the fetcher,
sadly.
(Bitbake rev: 1c574aae8c8ec427f27ab0d68bac9e7483016f18)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/bb/persist_data.py | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py index c6a209fb3f..286cc0a99d 100644 --- a/bitbake/lib/bb/persist_data.py +++ b/bitbake/lib/bb/persist_data.py | |||
@@ -18,7 +18,6 @@ import logging | |||
18 | import os.path | 18 | import os.path |
19 | import sqlite3 | 19 | import sqlite3 |
20 | import sys | 20 | import sys |
21 | import warnings | ||
22 | from collections import Mapping | 21 | from collections import Mapping |
23 | 22 | ||
24 | sqlversion = sqlite3.sqlite_version_info | 23 | sqlversion = sqlite3.sqlite_version_info |
@@ -238,55 +237,6 @@ class SQLTable(collections.MutableMapping): | |||
238 | def has_key(self, key): | 237 | def has_key(self, key): |
239 | return key in self | 238 | return key in self |
240 | 239 | ||
241 | |||
242 | class PersistData(object): | ||
243 | """Deprecated representation of the bitbake persistent data store""" | ||
244 | def __init__(self, d): | ||
245 | warnings.warn("Use of PersistData is deprecated. Please use " | ||
246 | "persist(domain, d) instead.", | ||
247 | category=DeprecationWarning, | ||
248 | stacklevel=2) | ||
249 | |||
250 | self.data = persist(d) | ||
251 | logger.debug("Using '%s' as the persistent data cache", | ||
252 | self.data.filename) | ||
253 | |||
254 | def addDomain(self, domain): | ||
255 | """ | ||
256 | Add a domain (pending deprecation) | ||
257 | """ | ||
258 | return self.data[domain] | ||
259 | |||
260 | def delDomain(self, domain): | ||
261 | """ | ||
262 | Removes a domain and all the data it contains | ||
263 | """ | ||
264 | del self.data[domain] | ||
265 | |||
266 | def getKeyValues(self, domain): | ||
267 | """ | ||
268 | Return a list of key + value pairs for a domain | ||
269 | """ | ||
270 | return list(self.data[domain].items()) | ||
271 | |||
272 | def getValue(self, domain, key): | ||
273 | """ | ||
274 | Return the value of a key for a domain | ||
275 | """ | ||
276 | return self.data[domain][key] | ||
277 | |||
278 | def setValue(self, domain, key, value): | ||
279 | """ | ||
280 | Sets the value of a key for a domain | ||
281 | """ | ||
282 | self.data[domain][key] = value | ||
283 | |||
284 | def delValue(self, domain, key): | ||
285 | """ | ||
286 | Deletes a key/value pair | ||
287 | """ | ||
288 | del self.data[domain][key] | ||
289 | |||
290 | def persist(domain, d): | 240 | def persist(domain, d): |
291 | """Convenience factory for SQLTable objects based upon metadata""" | 241 | """Convenience factory for SQLTable objects based upon metadata""" |
292 | import bb.utils | 242 | import bb.utils |