<div dir="ltr">For Hacakge 2, the distro ecosystem hasn't had quite as much tooling put into it as, say, documentation, and it has changed a little bit from Hackage 1. Previously, there was a cron job that, among tasks like updating documentation, also downloaded distro info and ran <<a href="http://code.haskell.org/~ross/hackage-scripts/DistroInfo.hs">http://code.haskell.org/~ross/hackage-scripts/DistroInfo.hs</a>> on it; the resulting files were read when generating the package page in <<a href="http://code.haskell.org/~ross/hackage-scripts/PackagePage.hs">http://code.haskell.org/~ross/hackage-scripts/PackagePage.hs</a>>.<div>
<br></div><div>No such job exists now. However, there is something to replace it in Hackage 2. It is not a cron job; it's more push than pull, actually. Distro maintainers can upload distro information directly to Hackage (either manually, using a form, or programmatically using something like curl). It is currently not exposed or documented that well, unfortunately, and it needs a last 10% of work to be fully functional. If you'd like, I think I'd be able to do it this week.</div>
<div><br></div><div>So what does this new API look like? Well, this is the list of distros we know about:</div><div><a href="http://hackage.haskell.org/distros/">http://hackage.haskell.org/distros/</a><br></div><div>And the set of packages we know about for Fedora:</div>
<div><a href="http://hackage.haskell.org/distro/Fedora/packages">http://hackage.haskell.org/distro/Fedora/packages</a><br></div><div><a href="http://hackage.haskell.org/distro/Fedora/packages.csv">http://hackage.haskell.org/distro/Fedora/packages.csv</a><br>
</div><div>The status for a given package:</div><div><a href="http://hackage.haskell.org/distro/Fedora/package/text">http://hackage.haskell.org/distro/Fedora/package/text</a><br></div><div>Finally, shown on the package page itself:</div>
<div><a href="http://hackage.haskell.org/package/text">http://hackage.haskell.org/package/text</a><br></div><div><br></div><div>There are per-distro ACLs so that the above information can kept up to date by authorized accounts. There are a few issues with this system currently, such as not being able to edit these ACLs over HTTP (!). Once this is fixed, it will be possible to do:</div>
<div>1. Bulk update: PUT a csv formatted like the one above, which is similar to the current format (the current format is a tuple, like <a href="http://people.debian.org/~nomeata/cabalDebianMap.txt">http://people.debian.org/~nomeata/cabalDebianMap.txt</a>). This will wipe the previous set of distro statuses for a given distro.</div>
<div>2. Add/update the distro status of an individual package: this is also a PUT, using two form fields (e.g. version=0.11.2.3&uri=<span style="color:rgb(0,0,0);white-space:pre-wrap"><a href="https://apps.fedoraproject.org/packages/ghc-text">https://apps.fedoraproject.org/packages/ghc-text</a></span>)</div>
<div>3. Delete the distro status of an individual package: this is a DELETE, perhaps meaning that the package is no longer offered</div><div><br></div><div>Unlike the previous system, using this *does* require Hackage credentials, and if this data comes from an automatic task, a bot account could possibly be used. It depends on what will work best with the current flow.</div>
<div><br></div><div>Best,</div><div>Matt</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 14, 2013 at 12:08 AM, Jens Petersen <span dir="ltr"><<a href="mailto:juhp@community.haskell.org" target="_blank">juhp@community.haskell.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi, it is great that Hackage 2 finally was deployed in production. :-)</div><div><br></div>How often does Hackage 2 update/pull distro data?<div>
<br></div><div>Hackage 1 had a cronjob I believe which ran every few hours I think.</div>
<div>But the new Hackage does not seem to pull often/regularly.</div><div><br></div><div>For Fedora I updated the data on 18 Sept and then 26 Sept.</div><div>The update from 18th Sept is reflected in Hackage but not 26th Sept.</div>

<div>Checking more I guess the 18 Sept was still during Hackage1</div><div>so it looks like Hackage2 has not updated it distro data since</div><div>going into production?</div><div><br></div><div>Is there a cronjob setup on the new hackage server currently</div>

<div>for pulling distro package data?</div><div><br></div><div>Thanks, Jens</div></div>
<br>_______________________________________________<br>
cabal-devel mailing list<br>
<a href="mailto:cabal-devel@haskell.org">cabal-devel@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/cabal-devel" target="_blank">http://www.haskell.org/mailman/listinfo/cabal-devel</a><br>
<br></blockquote></div><br></div>