summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2009-07-30 18:03:51 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2009-07-30 18:03:51 +0100
commitef9c095334632b8576667800d52b842f1cbf52ea (patch)
tree7a01161db220a78235b87dfc5c4417f5b714d3ea
parent64b04685b6fd029f2f70f7017bfd51d26ccb0d11 (diff)
downloadopenembedded-core-ef9c095334632b8576667800d52b842f1cbf52ea.tar.gz
openembedded-core-ef9c095334632b8576667800d52b842f1cbf52ea.tar.bz2
openembedded-core-ef9c095334632b8576667800d52b842f1cbf52ea.zip
bitbake: Make sure tables exist when renaming
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--bitbake-dev/lib/bb/persist_data.py1
-rw-r--r--bitbake/lib/bb/persist_data.py1
2 files changed, 2 insertions, 0 deletions
diff --git a/bitbake-dev/lib/bb/persist_data.py b/bitbake-dev/lib/bb/persist_data.py
index ea921072cd..1d60a0a139 100644
--- a/bitbake-dev/lib/bb/persist_data.py
+++ b/bitbake-dev/lib/bb/persist_data.py
@@ -76,6 +76,7 @@ class PersistData:
"""
self.connection.execute("DROP TABLE IF EXISTS %s;" % newdomain)
+ self.addDomain(domain)
self.connection.execute("ALTER TABLE %s RENAME TO %s;" % (domain, newdomain))
def getKeyValues(self, domain):
diff --git a/bitbake/lib/bb/persist_data.py b/bitbake/lib/bb/persist_data.py
index ea921072cd..1d60a0a139 100644
--- a/bitbake/lib/bb/persist_data.py
+++ b/bitbake/lib/bb/persist_data.py
@@ -76,6 +76,7 @@ class PersistData:
"""
self.connection.execute("DROP TABLE IF EXISTS %s;" % newdomain)
+ self.addDomain(domain)
self.connection.execute("ALTER TABLE %s RENAME TO %s;" % (domain, newdomain))
def getKeyValues(self, domain):