From e933af8ef0e915f0d44e9c59111d8e15e346e670 Mon Sep 17 00:00:00 2001 From: Mark Hymers Date: Sat, 26 Mar 2011 11:25:02 +0000 Subject: [PATCH] Fix Release file hardlink handling Signed-off-by: Mark Hymers --- dak/generate_releases.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dak/generate_releases.py b/dak/generate_releases.py index 8a371e8a..8cbd8031 100755 --- a/dak/generate_releases.py +++ b/dak/generate_releases.py @@ -154,7 +154,7 @@ class ReleaseWriter(object): suite_suffix = "%s" % (cnf.Find("Dinstall::SuiteSuffix")) outfile = os.path.join(cnf["Dir::Root"], 'dists', "%s/%s" % (suite.suite_name, suite_suffix), "Release") - out = open(outfile, "w") + out = open(outfile + ".new", "w") for key, dbfield in attribs: if getattr(suite, dbfield) is not None: @@ -280,6 +280,7 @@ class ReleaseWriter(object): out.write(" %s %8d %s\n" % (fileinfo[filename][h], fileinfo[filename]['len'], filename)) out.close() + os.rename(outfile + '.new', outfile) sign_release_dir(suite, os.path.dirname(outfile)) -- 2.39.5