Opened 3 years ago

Closed 3 years ago

#23096 closed enhancement (fixed)

New format for the package installed stamp files in $SAGE_SPKG_INST

Reported by: embray Owned by:
Priority: major Milestone: sage-8.0
Component: build Keywords:
Cc: jdemeyer Merged in:
Authors: Erik Bray Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: a53027e (Commits) Commit: a53027ed368efbce43b8956e5d60782dc797895c
Dependencies: Stopgaps:

Description

The contents of the stamp files that get written to $SAGE_SPKG_INST by spkg-install have a somewhat ad-hoc format. This updates the format to use JSON.

This change, and in particular the use of JSON, is motivated by #22510. The idea here is I would like to write a list of installed files for a package, along with any other metadata about that package to the same file, so this requires some amount of structure.

This could be accomplished with a simpler format easily, but I wanted to avoid using an ad-hoc format.

The downside to using JSON is that it is harder to parse with simple shell tools. But as far as I know there are not currently any tools that consume the contents of these files. And if such tools are written they can use Python or another language with JSON support.

Alternatively the files could be YAML-formatted--simple YAML files can be simpler to parse than JSON. But if want to parse it from Python we would probably want to include pyyaml as a dependency.

Change History (6)

comment:1 Changed 3 years ago by git

  • Commit set to a53027ed368efbce43b8956e5d60782dc797895c

Branch pushed to git repo; I updated commit sha1. New commits:

a53027eNew JSON format for the package installed stamp files

comment:2 Changed 3 years ago by jdemeyer

This change should be mostly harmless :-)

Let me know when this is needs_review.

comment:3 Changed 3 years ago by embray

  • Status changed from new to needs_review

I was just waiting to see if by some chance there was a test somewhere broken by this. I didn't think so just because grepping through the code it seemed highly unlikely.

comment:4 Changed 3 years ago by embray

  • Cc jdemeyer added

comment:5 Changed 3 years ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to positive_review

comment:6 Changed 3 years ago by vbraun

  • Branch changed from u/embray/build/stamp-file-format to a53027ed368efbce43b8956e5d60782dc797895c
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.