[Hackage] #570: Include distributions status on package page

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Keywords: patch Difficulty: unknown | Ghcversion: Platform: | --------------------------------+------------------------------------------- Hi, I would find it very helpful if the package pages on hackage would include information as to which packages are available in distributions (Debian, arch, gentoo...). I have implemented a patch that reads this information from a simple formatted text and displays it. I have also implemented the generation of the list for Debian at http://people.debian.org/~nomeata/cabalDebianMap.txt, see README. A cronjob should fetch this regularly (maybe 4 times a day). To add distributions, you need to create the appropriate list (URLs are optional), add the distribution name to DistroMap.hs and put the lists in the right location. It would be great if this could be deployed. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by guest): This looks good. I can provide metadata about the Arch Linux packages for each library and app. In general, this may help people find their distro packages, and increase awareness of the importance of packaging. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by duncan): I think a better way round is to keep the server dumb and to have smart clients PUT/POST this information to the server. I'd welcome a patch to implement this in the new hackage-server implementation: darcs get http://code.haskell.org/hackage-server/ As for a design, I think one resource per package, per distro, so we'd want to PUT status info in an agreed format (including eg URL to the distro package) to $server/package/$packageid/distro-status/$distro Using one resource per package seems like a lot for an initial import (but it's not that bad since with HTTP you can send lots of messages on a single connection) but it is simpler, more RESTful and is fine once you get into a steady state since you'd only post updates and new packages. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by nomeata): Is the new implementation running somewhere already? If the old implementation is going away anyways, then it would not hurt applying this patch, would it? It would be good from a motivational point- of-view. I’ll then try to make sure that for the new server, I’ll follow the better designed way. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by nomeata): Just checking back: Is there interest in this feature now, or strictly only after the setup of the the new implementation? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by duncan): Replying to [comment:4 nomeata]:
Just checking back: Is there interest in this feature now, or strictly only after the setup of the the new implementation?
Honestly I'm not terribly passionate for or against it going into the current hackage server. Ross maintains the existing hackage scripts so check with him. I have looked at the patch and it is fine, the only thing I'd worry about slightly is that it loads and parses each distro map file every time we serve a single package info page. For the new server, yes we would be interested in this feature and I'd be happy to advise on how it should be implemented. One argument for doing it now is if it helps us to persuade the distros to start collecting this info in a machine readable form sooner rather than later. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by ross): It's the risk of slowing down the package page that bothers me. I wouldn't mind if the information were in the per-package tags file (a primitive version of Duncan's resources), but that's probably not worth the bother. (Assuming the new version will be taking over soon.) -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by nomeata): Timing before my patches: {{{ $ time PATH_INFO=/xmonad-0.8.1 ./package >/dev/null real 0m0.021s user 0m0.012s sys 0m0.008s }}} Timing with the global package map: {{{ $ time PATH_INFO=/xmonad-0.8.1 ./package >/dev/null real 0m0.063s user 0m0.048s sys 0m0.008s }}} So you are right. I prepared a patch that adds a small tool, splitDistroMap, which copies the information into small files per package (not package+version, one level higher), and now the runtime is acceptable: {{{ $ time PATH_INFO=/xmonad-0.8.1 ./package >/dev/null real 0m0.022s user 0m0.016s sys 0m0.004s }}} I am attaching an updated patch. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:7 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by guest): Just as another reference, * http://www.galois.com/~dons/arch-haskell-status.html Uses http://hackage.haskell.org/package/archlinux, and integrates vote stats form ArchLinux and downloads from Hackage, with build reports. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:8 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by ross): splitDistroMap doesn't work: it applies {{{read str :: (String, String, Maybe String)}}} to lines like {{{ (agda-bin,"2.2.4","http://packages.debian.org/source/sid/agda-bin") }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:9 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by guest): Here's a cabal map for Arch Linux: * http://www.galois.com/~dons/cabalArchMap.txt -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:10 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by nomeata): Replying to [comment:9 ross]:
splitDistroMap doesn't work: it applies {{{read str :: (String, String, Maybe String)}}} to lines like {{{ (agda-bin,"2.2.4","http://packages.debian.org/source/sid/agda-bin") }}}
Right. My test data looks like this: {{{ ("alex","2.2",Just "http://packages.debian.org/source/sid/alex") }}} The rationale was that not every source might have a useful URL attached. I just did not update the instance running on people.debian.org to the new version. Doing that right now... dons, sorry for that, I hope you don’t mind adjusting your code for that change. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:11 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by ross@soi.city.ac.uk): OK, it's live now. I'll add Arch when it's updated. It's a little awkward that you want this to be per-package information, while the current interface has only package-version pages. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:12 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by nomeata): Great, thanks! Luckily the directory layout (package/version instead of package-version) is already prepared for per-package-information. And I think, by its nature, it really is per-package and not per-package-version information – but I’m open for suggestions how it would better fit in for hackage- server. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:13 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by dons): Here is the Arch Linux package info, in the new format: * http://www.galois.com/~dons/cabalArchMap.txt Do you need anything else to add support for Arch? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:14 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by dons): How often is the mapping regenerated? Once a day? I.e. how frequently should I update the distro map table? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:15 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by ross): Replying to [comment:15 dons]:
How often is the mapping regenerated? Once a day?
I.e. how frequently should I update the distro map table?
It's updated at the same time as the documentation, i.e. 4 times a day. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:16 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by nomeata): I only run it once a day, at 4:03 UTC, for Debian. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:17 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Changes (by till): * cc: till (added) Comment: I would like to add Fedora to the list of distributions. I can create such a mapping. Is it possible to cover the two stable releases of Fedora and the current development one? Or at least the latest stable and development? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:18 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment (by nomeata): There was a problem with the code: When a package was once part of a distribution, but is not any more, the distroInfoFile for that package has to be removed. The attached patch fixes that. (I hope it’s ok to re-open this ticket for such a patch. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:19 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: fixed Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Changes (by ross): * status: new => closed * resolution: => fixed -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:20 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: fixed Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment(by nomeata): Hi ross, did you see my latest patch, about cleaning up distroinfo? Thanks, Joachim -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:21 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: fixed Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment(by ross): Sorry, I missed that. Applied now. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:22 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#570: Include distributions status on package page --------------------------------+------------------------------------------- Reporter: nomeata | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: Component: hackageDB website | Version: Severity: normal | Resolution: fixed Keywords: patch | Difficulty: unknown Ghcversion: | Platform: --------------------------------+------------------------------------------- Comment(by till): Hi, my comment:18 is also still unanswered regarding Fedora support:
I would like to add Fedora to the list of distributions. I can create such a mapping. Is it possible to cover the two stable releases of Fedora and the current development one? Or at least the latest stable and development?
-- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/570#comment:23 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage