[calm - Cygwin server-side packaging maintenance script] branch master, updated. 20181020-16-g1393b82
jturney-9JcytcrH/[email protected]
| Newsgroups | gmane.os.cygwin.cvs.apps |
|---|---|
| Message-ID | <[email protected]> |
https://sourceware.org/git/gitweb.cgi?p=cygwin-apps/calm.git;h=1393b8219a8019e3dbf6716fc73afc204ed9b215 commit 1393b8219a8019e3dbf6716fc73afc204ed9b215 Author: Jon Turney <[email protected]> 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 #