[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20181020-16-g1393b82

jturney@sourceware.org jturney@sourceware.org
Mon May 27 10:35:00 GMT 2019




https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=1393b8219a8019e3dbf6716fc73afc204ed9b215

commit 1393b8219a8019e3dbf6716fc73afc204ed9b215
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Sun May 26 12:03:19 2019 +0100

    Write package metadata summary
    
    Write a summary of package metadata in json format.


Diff:
---
 calm/calm.py |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/calm/calm.py b/calm/calm.py
index 76ffd39..768003e 100755
--- a/calm/calm.py
+++ b/calm/calm.py
@@ -459,8 +459,14 @@ def do_output(args, state):
         logging.debug('writing %s' % (tmpfile.name))
         with lzma.open(tmpfile, 'wt') as lzf:
             package.write_repo_json(args, state.packages, lzf)
-        logging.info("moving %s to %s" % (tmpfile.name, jsonfile))
-        shutil.move(tmpfile.name, jsonfile)
+    logging.info("moving %s to %s" % (tmpfile.name, jsonfile))
+    shutil.move(tmpfile.name, jsonfile)
+
+    # make it world-readable, if we can
+    try:
+        os.chmod(jsonfile, 0o644)
+    except (OSError):
+        pass
 
 
 #



More information about the Cygwin-apps-cvs mailing list