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

[dak/security] Fix yaml dump bug in syck by using yaml instead



---
 ChangeLog          |    7 ++++++-
 dak/transitions.py |    5 +++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index bca99f6..3b0d04f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
+2008-05-12  Joerg Jaspert  <joerg@debian.org>
+
+	* dak/transitions.py: use yaml.dump instead of syck.dump, as syck
+	seems to have a bug in its dump(), causing it to write illegal entries
+
 2008-05-10  Stephen Gran   <sgran@debian.org>
-       * tools/debianqueued-0.9/debianqueued: First pass at a send_mail 
+       * tools/debianqueued-0.9/debianqueued: First pass at a send_mail
          implementation that sucks less
        * Update debian/control to reflect new perl dependency
 
diff --git a/dak/transitions.py b/dak/transitions.py
index a37dbef..e4b6d58 100755
--- a/dak/transitions.py
+++ b/dak/transitions.py
@@ -29,6 +29,7 @@ from daklib import database
 from daklib import utils
 from daklib.dak_exceptions import TransitionsError
 import syck
+import yaml
 
 # Globals
 Cnf = None
@@ -219,7 +220,7 @@ def write_transitions(from_trans):
     temp_lock  = lock_file(trans_temp)
 
     destfile = file(trans_temp, 'w')
-    syck.dump(from_trans, destfile)
+    yaml.dump(from_trans, destfile, default_flow_style=False)
     destfile.close()
 
     os.rename(trans_temp, trans_file)
@@ -259,7 +260,7 @@ def temp_transitions_file(transitions):
     (fd, path) = tempfile.mkstemp("", "transitions", Cnf["Transitions::TempPath"])
     os.chmod(path, 0644)
     f = open(path, "w")
-    syck.dump(transitions, f)
+    yaml.dump(transitions, f, default_flow_style=False)
     return path
 
 ################################################################################
-- 
1.5.6.5



Reply to: