summaryrefslogtreecommitdiffstats
path: root/lib/bb/persist_data.py
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2009-10-17 19:02:09 +0100
committerRichard Purdie <rpurdie@rpsys.net>2009-10-17 19:22:52 +0100
commit6252c7d5c1c7123d16fc3c7db2edc6751420f12c (patch)
treea906dd23c74dd626152ac097a0e18c184b7da69d /lib/bb/persist_data.py
parentc4b18ff5e26e4f52336fe1fc5a0e215e4d4d9aaa (diff)
downloadbitbake-contrib-6252c7d5c1c7123d16fc3c7db2edc6751420f12c.tar.gz
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 <rpurdie@rpsys.net>
Diffstat (limited to 'lib/bb/persist_data.py')
-rw-r--r--lib/bb/persist_data.py11
1 files changed, 11 insertions, 0 deletions
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