[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[dak/master] Lock {src,bin}_associations to stop other things writing to them during gps



Signed-off-by: Mark Hymers <mhy@debian.org>
---
 dak/generate_packages_sources2.py |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/dak/generate_packages_sources2.py b/dak/generate_packages_sources2.py
index 7eca3c8..f3181fd 100755
--- a/dak/generate_packages_sources2.py
+++ b/dak/generate_packages_sources2.py
@@ -397,6 +397,10 @@ def main():
         else:
             logger.log(['E: ', msg])
 
+    # Lock tables so that nobody can change things underneath us
+    session.execute("LOCK TABLE src_associations IN SHARE MODE")
+    session.execute("LOCK TABLE bin_associations IN SHARE MODE")
+
     for s in suites:
         component_ids = [ c.component_id for c in s.components ]
         if s.untouchable and not force:
-- 
1.7.10.4


Reply to: