Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plan.json should contain the Hackage revision number #6186

Open
amigalemming opened this issue Aug 10, 2019 · 3 comments
Open

plan.json should contain the Hackage revision number #6186

amigalemming opened this issue Aug 10, 2019 · 3 comments
Labels
re: pvp Concerning the Haskell Package Versioning Policy type: enhancement

Comments

@amigalemming
Copy link
Contributor

I use plan.json to generate Flatpak manifests. Flatpak expects immutable sources fixed by hashes, e.g.:

{
  "url": "https://hackage.haskell.org/package/integer-logarithms-1.0.3/integer-logarithms.cabal",
  "type": "file",
  "sha256": "21cdc5661958a703303d2b430220908db8c2c42dbc58db0d7baac1d171f31768"
}

However, the Cabal file may change due to an update to the Cabal file. Thus I would actually need to specifiy the URL:
https://hackage.haskell.org/package/integer-logarithms-1.0.3/revision/1.cabal

But plan.json does not tell the revision where its pkg-cabal-sha256 refers to.
Please add the revision number to plan.json.
Or is there an easy way to retrieve this information from 01-index.tar and friends?

@hvr
Copy link
Member

hvr commented Aug 27, 2019

The problem is that the revision number is a bit of an contextual information that emerges only once you know exactly which repository the .cabal file comes from (it's basically the occurence count within the stream of package index events)

However, I do have an add-on tool which allows efficient reverse-lookups of the sha256 to revision-numbering, if you're interested...

@amigalemming
Copy link
Contributor Author

I'd prefer a library interface, but a command-line tool would be ok for now.

@amigalemming
Copy link
Contributor Author

amigalemming commented Sep 20, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
re: pvp Concerning the Haskell Package Versioning Policy type: enhancement
Projects
None yet
Development

No branches or pull requests

3 participants