From 6252c7d5c1c7123d16fc3c7db2edc6751420f12c Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sat, 17 Oct 2009 19:02:09 +0100 Subject: Add a compare-versions command which returns whether the SRCREV versions have changed since bitbake was last run (from Poky) Signed-off-by: Richard Purdie --- lib/bb/persist_data.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib/bb/persist_data.py') diff --git a/lib/bb/persist_data.py b/lib/bb/persist_data.py index 79e7448be..bc4045fe8 100644 --- a/lib/bb/persist_data.py +++ b/lib/bb/persist_data.py @@ -69,6 +69,17 @@ class PersistData: """ self.connection.execute("DROP TABLE IF EXISTS %s;" % domain) + def getKeyValues(self, domain): + """ + Return a list of key + value pairs for a domain + """ + ret = {} + data = self.connection.execute("SELECT key, value from %s;" % domain) + for row in data: + ret[str(row[0])] = str(row[1]) + + return ret + def getValue(self, domain, key): """ Return the value of a key for a domain -- cgit 1.2.3-korg