Ticket #570: set-up-distroinfo-module2.dpatch

File set-up-distroinfo-module2.dpatch, 29.1 KB (added by nomeata, 4 years ago)

Updated patch, includes patches from the other file.

Line 
1Sun Jul 26 13:30:15 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
2  * Set up DistroInfo module
3
4Sun Jul 26 15:19:37 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
5  * Add a note in the README about the files
6
7Sun Jul 26 15:26:13 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
8  * Implement DistroInfo
9
10Sat Aug 22 18:36:09 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
11  * New function Util.unversionedPackageDir
12 
13  This is like packageDir, but takes a PackageName instead of a PackageIdentifier
14  and thus returns the parent directory of packageDir. This new function is then
15  also used in packageDir.
16
17Sat Aug 22 18:37:12 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
18  * DistroInfo.splitDistroInfo
19 
20  Add a function to DistroInfo to split the all-archive-distro-maps per package,
21  and write out short files per PackageName (not package+version) with only the
22  information for that package, to reduce parsing time.
23
24Sat Aug 22 18:38:21 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
25  * Binary program to split the distro map
26
27Sat Aug 22 18:40:57 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
28  * Use the new per-package DistroInfo API in PackagePage
29
30Sat Aug 22 18:46:44 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
31  * Add splitDistroMap to Makefile
32
33Sat Aug 22 18:46:54 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
34  * Avoid compiler warnings in code added by me
35
36Sat Aug 22 18:50:07 CEST 2009  Joachim Breitner <mail@joachim-breitner.de>
37  * Mention splitDistroMap in README
38-----BEGIN PGP SIGNED MESSAGE-----
39Hash: SHA1
40
41
42New patches:
43
44[Set up DistroInfo module
45Joachim Breitner <mail@joachim-breitner.de>**20090726113015
46 Ignore-this: 4c4e6a6fe6fa5a9044363097b5005159
47] {
48hunk ./Makefile 48
49        $(HC) --make -Wall -o $@ upload-pkg.hs
50        strip $@
51 
52- -package: package.hs HaddockLex.hs HaddockParse.hs HaddockHtml.hs HackagePage.hs Locations.hs ModuleForest.hs PackagePage.hs Util.hs TagMap.hs
53+package: package.hs HaddockLex.hs HaddockParse.hs HaddockHtml.hs HackagePage.hs Locations.hs ModuleForest.hs PackagePage.hs Util.hs TagMap.hs DistroInfo.hs
54        $(HC) --make -Wall -o $@ package.hs
55        strip $@
56 
57hunk ./PackagePage.hs 30
58                                  availableVersions, maybeLast, packageURL,
59                                  packageDir, splitOn, catLabel )
60 import TagMap
61+import DistroInfo
62 
63 import HaddockParse            ( parseHaddockParagraphs )
64 import HaddockLex              ( tokenise )
65hunk ./PackagePage.hs 60
66        , pdBuildFailures :: Map GHCVersion URL
67                -- ^ Failed builds of this version of the package
68                -- (if available).
69+       , pdDistributions :: [(Distro, Version, Maybe URL)]
70+               -- ^ Package versions availble in distributions (Debian, arc,
71+               -- etc.), their latest version and a possible link
72        }
73 
74 type GHCVersion = String
75hunk ./PackagePage.hs 89
76        builds <- getBuilds "success"
77        failures <- getBuilds "failure"
78        tag_map <- loadTagMap pkgId
79+       distro_map <- getDistroMap
80 
81        return $ PackageData
82                { pdDescription = pkg
83hunk ./PackagePage.hs 99
84                , pdDocURL = mbHtmlURL
85                , pdBuilds = builds
86                , pdBuildFailures = failures
87+               , pdDistributions = Map.findWithDefault [] (pkgName pkgId) distro_map
88                }
89   where pkgId = package (packageDescription pkg)
90        pkgDir = packageDir pkgId
91hunk ./PackagePage.hs 183
92                (if null successes then []
93                 else [("Built on", commaList (map toHtml successes))]) ++
94                (if null failures then []
95- -              else [("Build failure", commaList (map showLog failures))])
96+                else [("Build failure", commaList (map showLog failures))]) ++
97+               (if null (pdDistributions pd) then []
98+                else [("Distributions", commaList (map showDistribution (pdDistributions pd)))])
99        ]
100   where all_vs = pdAllVersions pd
101        earlier_vs = takeWhile (< pversion) all_vs
102hunk ./PackagePage.hs 208
103                toHtml (desc ++ " (") +++
104                (anchor ! [href url] << "log") +++
105                toHtml ")"
106+       showDistribution (distro,dversion,Just url) =
107+               toHtml (distro ++ ": ") +++
108+               (anchor ! [href url] << display dversion)
109+       showDistribution (distro,dversion,Nothing) =
110+               toHtml (distro ++ ": ") +++ display dversion
111        capitalize (c:cs) = toUpper c : cs
112        capitalize "" = ""
113         dispTagVal "superseded by" v = anchor ! [href (packageURL (PackageIdentifier (PackageName v) (Version [] [])))] << v
114}
115[Add a note in the README about the files
116Joachim Breitner <mail@joachim-breitner.de>**20090726131937
117 Ignore-this: 7d581e418b9c82a24d1367946ac81f50
118] hunk ./README 40
119 * Pick a bin directory writable by you to hold post-upload-hook and pkg-list.
120 * Modify the paths at the head of your copy of Makefile, post-upload-hook and
121   Locations.hs to suit.
122+* To track the state of hackage packages in Distributions, you need to fill the files
123+  /srv/www/hackage.haskell.org/public_html/packages/archive/distromap-$distro.txt
124+  At the moment, only Debian is supported. You can fetch the files via
125+  wget http://people.debian.org/~nomeata/cabalDebianMap.txt \
126+       /srv/www/hackage.haskell.org/public_html/packages/archive/distromap-Debian.txt
127+  which you should probably call regularily from a cronjob.
128+
129[Implement DistroInfo
130Joachim Breitner <mail@joachim-breitner.de>**20090726132613
131 Ignore-this: 1e2fee85bbad474dc2eef2377e50a1e1
132] {
133addfile ./DistroInfo.hs
134hunk ./DistroInfo.hs 1
135+module DistroInfo (Distro, getDistroMap) where
136+
137+import qualified Data.Map as M
138+import Distribution.Package
139+import Distribution.Version    ( Version )
140+import Text.XHtml              ( URL )
141+import Locations
142+import System.IO
143+import System.FilePath
144+import PublicFile
145+import Distribution.Text(simpleParse)
146+
147+-- | Could be extended to a ADT with explicitly known distros, to e.g. link to
148+-- an icon
149+type Distro = String
150+
151+type DistroMap = M.Map PackageName [(Distro, Version, Maybe URL)]
152+
153+
154+distros :: [Distro]
155+distros = ["Debian"]
156+
157+getDistroMap :: IO DistroMap
158+getDistroMap = foldr (M.unionWith (++)) M.empty `fmap` mapM getDistoMapFor distros
159+
160+getDistoMapFor :: Distro -> IO DistroMap
161+getDistoMapFor distro =
162+       withFile (distrMapFile distro) ReadMode ( \ h -> do
163+                s <- hGetContents h
164+                return $! foldr parseDistroLine M.empty (lines s)
165+        ) `catch`
166+                const (return M.empty)
167+ where parseDistroLine str = case simpleParse version of
168+                 Just parsed_version -> M.unionWith (++) (M.singleton parsed_package [(distro,parsed_version,url)])
169+                 Nothing             -> id
170+         where (package, version, url) = read str :: (String, String, Maybe String)
171+               parsed_package = PackageName package
172+
173+distrMapFile :: Distro -> FilePath
174+distrMapFile distro = localFile archiveDir </> "distromap-" ++ distro ++ ".txt"
175}
176[New function Util.unversionedPackageDir
177Joachim Breitner <mail@joachim-breitner.de>**20090822163609
178 Ignore-this: bf246d5c43642614884da3a26bbd001f
179 
180 This is like packageDir, but takes a PackageName instead of a PackageIdentifier
181 and thus returns the parent directory of packageDir. This new function is then
182 also used in packageDir.
183] hunk ./Util.hs 96
184 
185 packageDir :: PackageIdentifier -> PublicFile
186 packageDir pkgId =
187- -     archiveDir `slash` display (pkgName pkgId) `slash` display (pkgVersion pkgId)
188+       unversionedPackageDir (pkgName pkgId) `slash` display (pkgVersion pkgId)
189+
190+unversionedPackageDir :: PackageName -> PublicFile
191+unversionedPackageDir pkgName =
192+       archiveDir `slash` display pkgName
193 
194 -- | Load a package description from HackageDB.
195 loadPackageDescription :: PackageIdentifier -> IO GenericPackageDescription
196[DistroInfo.splitDistroInfo
197Joachim Breitner <mail@joachim-breitner.de>**20090822163712
198 Ignore-this: 7340701ff507210abfe06cb3048d4935
199 
200 Add a function to DistroInfo to split the all-archive-distro-maps per package,
201 and write out short files per PackageName (not package+version) with only the
202 information for that package, to reduce parsing time.
203] {
204hunk ./DistroInfo.hs 1
205- -module DistroInfo (Distro, getDistroMap) where
206+module DistroInfo (Distro, splitDistroInfo, getDistroInfo) where
207 
208 import qualified Data.Map as M
209hunk ./DistroInfo.hs 4
210+import Control.Monad
211 import Distribution.Package
212 import Distribution.Version    ( Version )
213 import Text.XHtml              ( URL )
214hunk ./DistroInfo.hs 12
215 import System.IO
216 import System.FilePath
217 import PublicFile
218+import Util
219 import Distribution.Text(simpleParse)
220hunk ./DistroInfo.hs 14
221+import System.IO.Error
222 
223 -- | Could be extended to a ADT with explicitly known distros, to e.g. link to
224 -- an icon
225hunk ./DistroInfo.hs 20
226 type Distro = String
227 
228- -type DistroMap = M.Map PackageName [(Distro, Version, Maybe URL)]
229+type DistroInfo = [(Distro, Version, Maybe URL)]
230+
231+type DistroMap = M.Map PackageName (DistroInfo)
232 
233 
234 distros :: [Distro]
235hunk ./DistroInfo.hs 46
236 
237 distrMapFile :: Distro -> FilePath
238 distrMapFile distro = localFile archiveDir </> "distromap-" ++ distro ++ ".txt"
239+
240+distroInfoFile :: PackageName -> FilePath
241+distroInfoFile pkgName = localFile (unversionedPackageDir pkgName) </> "distroinfo"
242+
243+getDistroInfo :: PackageName -> IO DistroInfo
244+getDistroInfo pkgName = withFile (distroInfoFile pkgName) ReadMode ( \ h -> do
245+                s <- hGetContents h
246+                return $! read s
247+        ) `catch`
248+                const (return [])
249+
250+writeDistroInfo :: PackageName -> DistroInfo -> IO ()
251+writeDistroInfo packageName distroInfo =
252+       writeFile (distroInfoFile packageName) (show distroInfo)
253+       `catch` (\e -> if isDoesNotExistError e then return () else ioError e)
254+
255+splitDistroInfo :: IO ()
256+splitDistroInfo = do
257+       dm <- getDistroMap
258+       forM_ (M.toList dm) $ uncurry writeDistroInfo
259+
260}
261[Binary program to split the distro map
262Joachim Breitner <mail@joachim-breitner.de>**20090822163821
263 Ignore-this: 6c0d2733d78e772582f8a8f142ebbee4
264] {
265addfile ./splitDistroMap.hs
266hunk ./splitDistroMap.hs 1
267+module Main where
268+
269+import DistroInfo
270+
271+main = splitDistroInfo
272}
273[Use the new per-package DistroInfo API in PackagePage
274Joachim Breitner <mail@joachim-breitner.de>**20090822164057
275 Ignore-this: 918119c885ae61604bbeb7e8806a5642
276] {
277hunk ./PackagePage.hs 89
278        builds <- getBuilds "success"
279        failures <- getBuilds "failure"
280        tag_map <- loadTagMap pkgId
281- -     distro_map <- getDistroMap
282+       distro_info <- getDistroInfo (pkgName pkgId)
283 
284        return $ PackageData
285                { pdDescription = pkg
286hunk ./PackagePage.hs 99
287                , pdDocURL = mbHtmlURL
288                , pdBuilds = builds
289                , pdBuildFailures = failures
290- -             , pdDistributions = Map.findWithDefault [] (pkgName pkgId) distro_map
291+               , pdDistributions = distro_info
292                }
293   where pkgId = package (packageDescription pkg)
294        pkgDir = packageDir pkgId
295}
296[Add splitDistroMap to Makefile
297Joachim Breitner <mail@joachim-breitner.de>**20090822164644
298 Ignore-this: 11d7c96d0158487d03285cb6cb6a366
299] {
300hunk ./Makefile 4
301 SHELL  = /bin/sh
302 HC     = ghc
303 CGI_PROGS = upload-pkg check-pkg package search
304- -AUX_PROGS = pkg-list recent-adds rss-feed latest-versions
305+AUX_PROGS = pkg-list recent-adds rss-feed latest-versions splitDistroMap
306 GEN_PROGS = $(CGI_PROGS) $(AUX_PROGS)
307 PROGS  = $(GEN_PROGS) post-upload-hook preferred-versions
308 
309hunk ./Makefile 74
310        $(HC) --make -Wall -o $@ latest-versions.hs
311        strip $@
312 
313+splitDistroMap: splitDistroMap.hs DistroInfo.hs Locations.hs Util.hs
314+       $(HC) --make -Wall -o $@ splitDistroMap.hs
315+       strip $@
316+
317 clean:
318        $(RM) *.o *.hi
319        $(RM) HaddockLex.hs HaddockParse.hs
320}
321[Avoid compiler warnings in code added by me
322Joachim Breitner <mail@joachim-breitner.de>**20090822164654
323 Ignore-this: c144ce4997793fefc1bcfb006c21abca
324] {
325hunk ./DistroInfo.hs 48
326 distrMapFile distro = localFile archiveDir </> "distromap-" ++ distro ++ ".txt"
327 
328 distroInfoFile :: PackageName -> FilePath
329- -distroInfoFile pkgName = localFile (unversionedPackageDir pkgName) </> "distroinfo"
330+distroInfoFile pkg_name = localFile (unversionedPackageDir pkg_name) </> "distroinfo"
331 
332 getDistroInfo :: PackageName -> IO DistroInfo
333hunk ./DistroInfo.hs 51
334- -getDistroInfo pkgName = withFile (distroInfoFile pkgName) ReadMode ( \ h -> do
335+getDistroInfo pkg_name = withFile (distroInfoFile pkg_name) ReadMode ( \ h -> do
336                 s <- hGetContents h
337                 return $! read s
338         ) `catch`
339hunk ./Util.hs 99
340        unversionedPackageDir (pkgName pkgId) `slash` display (pkgVersion pkgId)
341 
342 unversionedPackageDir :: PackageName -> PublicFile
343- -unversionedPackageDir pkgName =
344- -     archiveDir `slash` display pkgName
345+unversionedPackageDir pkg_name =
346+       archiveDir `slash` display pkg_name
347 
348 -- | Load a package description from HackageDB.
349 loadPackageDescription :: PackageIdentifier -> IO GenericPackageDescription
350hunk ./splitDistroMap.hs 5
351 
352 import DistroInfo
353 
354+main :: IO ()
355 main = splitDistroInfo
356}
357[Mention splitDistroMap in README
358Joachim Breitner <mail@joachim-breitner.de>**20090822165007
359 Ignore-this: 4af14467aa9dc0267dde9b6b886de4dc
360] hunk ./README 45
361   At the moment, only Debian is supported. You can fetch the files via
362   wget http://people.debian.org/~nomeata/cabalDebianMap.txt \
363        /srv/www/hackage.haskell.org/public_html/packages/archive/distromap-Debian.txt
364- -  which you should probably call regularily from a cronjob.
365+  and use the "splitDistroMap" program to put the information in the right
366+  per-package files.
367+  These two command should probably be called regularily from a cronjob.
368 
369
370Context:
371
372[show source repository
373Ross Paterson <ross@soi.city.ac.uk>**20090706170551
374 Ignore-this: 234c01bf707eaec9ac4efc8ca33ae7e6
375 
376 Only shows the development repo, and may be a bit simplistic.
377]
378[shorter package URL
379Ross Paterson <ross@soi.city.ac.uk>**20090611154034
380 Ignore-this: c812b49a1ca575e9c952d768860f3e2a
381]
382[canonicalize category links
383Ross Paterson <ross@soi.city.ac.uk>**20090611154013
384 Ignore-this: 4b320ba32d1aee8b92ca9c96e76bf112
385]
386[use display instead of show on license field
387Ross Paterson <ross@soi.city.ac.uk>**20090119134457]
388[explicit imports to avoid clash with Cabal-1.7
389Ross Paterson <ross@soi.city.ac.uk>**20081222124657]
390[add bug tracker link (#415)
391Ross Paterson <ross@soi.city.ac.uk>**20081126232839]
392[non-semantic changes to sync lexer and parser with versions in GHC
393Ross Paterson <ross@soi.city.ac.uk>**20081115170018]
394[update Haddock parser to 0.9 (fixes #406)
395Ross Paterson <ross@soi.city.ac.uk>**20081114235827]
396[record times in UTC
397Ross Paterson <ross@soi.city.ac.uk>**20081109151646]
398[show build failures and sucesses on different versions of GHC
399Ross Paterson <ross@soi.city.ac.uk>**20081109135425]
400[Read the .cabal file as UTF8 when unpacking (from Duncan Coutts)
401Ross Paterson <ross@soi.city.ac.uk>**20081101154633
402 Previously the upload check preview displayed incorrect encoding of
403 people's names and did not validate incorrect UTF8 encodings.
404]
405[use sparklines generated on an upload
406Ross Paterson <ross@soi.city.ac.uk>**20081024122101]
407[add graph to Recent additions page
408Ross Paterson <ross@soi.city.ac.uk>**20081024001245]
409[uniform layout whether or not haddock present, with italics for non-module nodes
410Ross Paterson <ross@soi.city.ac.uk>**20081014100238]
411[reformat the module list to look a bit more like Haddock's
412Ross Paterson <ross@soi.city.ac.uk>**20081014083632]
413[Render exposed modules as a nested list (#308)
414Ross Paterson <ross@soi.city.ac.uk>**20081014074946
415 
416 Written by Bas van Dijk.
417]
418[Marking packages deprecated
419Chry Cheng <chrycheng@gmail.com>**20080828145516
420 Fixes ticket no. 261 as discussed in its annotations.  Packages with "deprecated" "true" are excluded from the package list.  Packages with "superseded by" tags provide links to their superseding packages in the package page.
421]
422[Update deps to require Cabal-1.6
423Duncan Coutts <duncan@haskell.org>**20081011002506]
424[Update install procedure to install the preferred-versions
425Duncan Coutts <duncan@haskell.org>**20081010000322]
426[Add the initial preferred-versions list
427Duncan Coutts <duncan@haskell.org>**20081010000306]
428[Add the preferred-versions file into the 00-index.tar.gz file
429Duncan Coutts <duncan@haskell.org>**20081009235419
430 Old clients should ignore it.
431]
432[update files using mv to avoid corruption
433Ross Paterson <ross@soi.city.ac.uk>**20080907114910]
434[put synopsis in header, show version in context
435Ross Paterson <ross@soi.city.ac.uk>**20080905162925]
436[fix warning
437Ross Paterson <ross@soi.city.ac.uk>**20080905162858]
438[eliminate redundant dependencies
439Ross Paterson <ross@soi.city.ac.uk>**20080902001615]
440[update for Cabal 1.5
441Ross Paterson <ross@soi.city.ac.uk>**20080827020703]
442[use "none" for unmaintained packages
443Ross Paterson <ross@soi.city.ac.uk>**20080723224421]
444[add Hayoo to menu bar
445Ross Paterson <ross@soi.city.ac.uk>**20080723214433]
446[use a single methods to get the package info for display
447Ross Paterson <ross@soi.city.ac.uk>**20080628231737]
448[don't build index asynchronously
449Ross Paterson <ross@soi.city.ac.uk>**20080628231704]
450[flag null maintainer field on package page
451Ross Paterson <ross@soi.city.ac.uk>**20080628231424]
452[use non-versioned links in the package index (#271, #278)
453Ross Paterson <ross@soi.city.ac.uk>**20080510234607]
454[if a package has built, ignore any failures
455Ross Paterson <ross@soi.city.ac.uk>**20080425154935]
456[track changes to checkPackage
457Ross Paterson <ross@soi.city.ac.uk>**20080424003335]
458[add a meta tag declaring the charset as ISO-8859-1, as that's what Text.XHtml generates
459Ross Paterson <ross@soi.city.ac.uk>**20080328154601]
460[make parse warnings fatal
461Ross Paterson <ross@soi.city.ac.uk>**20080328121040]
462[update to Cabal 1.3.9
463Ross Paterson <ross@soi.city.ac.uk>**20080328120711]
464[disallow updating an existing package
465Ross Paterson <ross@soi.city.ac.uk>**20080328120600]
466[generate 00-index.tar.gz asynchronously
467Ross Paterson <ross@soi.city.ac.uk>**20080302105639]
468[prune the search for cabal files to make it go faster
469Ross Paterson <ross@soi.city.ac.uk>**20080302105432]
470[add small latest-versions lister
471Ross Paterson <ross@soi.city.ac.uk>**20080221134229]
472[use absolute filenames when looking for packages
473Ross Paterson <ross@soi.city.ac.uk>**20080221124040]
474[longer label on the search button
475Ross Paterson <ross@soi.city.ac.uk>**20080221123956]
476[simple implementation of tags, starting with upload info
477Ross Paterson <ross@soi.city.ac.uk>**20080216021131]
478[swap arguments to extraChecks
479Ross Paterson <ross@soi.city.ac.uk>**20080214182808]
480[fix warning
481Ross Paterson <ross@soi.city.ac.uk>**20080214182753]
482[Update to latest Cabal lib API and use new package checking code
483Duncan Coutts <duncan@haskell.org>**20080213201347
484 Compiles but otherwise totally untested.
485]
486[remove private copies of functions now in ghc 6.8
487Ross Paterson <ross@soi.city.ac.uk>**20080212011430]
488[introduce PublicFile for files visible through the web
489Ross Paterson <ross@soi.city.ac.uk>**20080212005643]
490[refactoring of upload and check scripts
491Ross Paterson <ross@soi.city.ac.uk>**20080211131109]
492[unpack the whole directory, not just the .cabal file
493Ross Paterson <ross@soi.city.ac.uk>**20080211131009]
494[add a Google search box to the package list page
495Ross Paterson <ross@soi.city.ac.uk>**20080203021954]
496[swap depends-on and required-by maps
497Ross Paterson <ross@soi.city.ac.uk>**20080202012507]
498[list successful and unsuccessful builds, with logs
499Ross Paterson <ross@soi.city.ac.uk>**20080126013443]
500[blacklist Application, Tool and Type categories
501Ross Paterson <ross@soi.city.ac.uk>**20071213074800]
502[add author
503Ross Paterson <ross@soi.city.ac.uk>**20071213074632]
504[correct and simplify the library and programs test
505Ross Paterson <ross@soi.city.ac.uk>**20071210104009]
506[capitalize category names
507Ross Paterson <ross@soi.city.ac.uk>**20071130143321]
508[merge category names that differ only in case
509Ross Paterson <ross@soi.city.ac.uk>**20071130142342]
510[render equality constraints concisely
511Ross Paterson <ross@soi.city.ac.uk>**20071128005652]
512[ignore case when sorting lists of dependent packages
513Ross Paterson <ross@soi.city.ac.uk>**20071120123549]
514[display dependencies in disjunctive normal form
515Ross Paterson <ross@soi.city.ac.uk>**20071024225216]
516[Oops, need the flattened package description to get exposed modules and executables
517Ross Paterson <ross@soi.city.ac.uk>**20071024070848]
518[use GenericPackageDescription instead of PackageDescription
519Ross Paterson <ross@soi.city.ac.uk>**20071024064933]
520[now need Cabal >= 1.2.1
521Ross Paterson <ross@soi.city.ac.uk>**20071021155643]
522[update for Cabal 1.2.1
523Ross Paterson <ross@soi.city.ac.uk>**20071021155322]
524[cabal packaging (based on work of Trevor Elliott)
525Ross Paterson <ross@soi.city.ac.uk>**20071019124210]
526[also install search
527Ross Paterson <ross@soi.city.ac.uk>**20070909185526]
528[Added search functionality (by Sascha Böhme), but not yet in main menu
529Ross Paterson <ross@soi.city.ac.uk>**20070909140603]
530[update for Cabal-1.2
531Ross Paterson <ross@soi.city.ac.uk>**20070907234506]
532[ensure the package list contains latest versions, plus some refacting
533Ross Paterson <ross@soi.city.ac.uk>**20070723204248]
534[add link to build log to package page
535Ross Paterson <ross@soi.city.ac.uk>**20070720124702]
536[minor build updates
537Ross Paterson <ross@soi.city.ac.uk>**20070617213315]
538[fix rendering of identifiers
539Ross Paterson <ross@soi.city.ac.uk>**20070617213249]
540[add missing file
541Ross Paterson <ross@soi.city.ac.uk>**20070530140019]
542[bugfix for previous commit
543Ross Paterson <ross@soi.city.ac.uk>**20070510142803]
544[fix error in building index
545Ross Paterson <ross@soi.city.ac.uk>**20070508165611]
546[include a package in the list only if it has a Cabal file
547Ross Paterson <ross@soi.city.ac.uk>**20070506180938]
548[change the directory layout of the HackageDB data
549Ross Paterson <ross@soi.city.ac.uk>**20070506151844
550 
551 Put version in a separate directory (to simplify future expansion).
552 This will not affect users of the web interface, but will be a breaking
553 change for those who reference the files directly, notably cabal-install.
554 
555 Here's how the positions of the files of the binary package change
556 (-> denotes a symbolic link):
557 
558 Old layout                              New layout
559 --------------------------------------------------------------------
560 binary/binary-0.2.cabal                 binary/0.2/binary.cabal
561 binary/binary-0.2.tar.gz                binary/0.2/binary-0.2.tar.gz
562 binary/binary-0.2.misc/doc/html/        binary/0.2/doc/html/
563 binary/binary-0.3.cabal                 binary/0.3/binary.cabal
564 binary/binary-0.3.tar.gz                binary/0.3/binary-0.3.tar.gz
565 binary/binary-0.3.misc/doc/html/        binary/0.3/doc/html/
566 binary/latest.misc -> binary-0.3.misc   binary/latest -> 0.3
567]
568[catch "Unclassified" category
569Ross Paterson <ross@soi.city.ac.uk>**20070307011355]
570[use local copy of Cabal logo
571Ross Paterson <ross@soi.city.ac.uk>**20070225125801]
572[make "recent additions" a generated page instead of a CGI script
573Ross Paterson <ross@soi.city.ac.uk>**20070220235702]
574[tweaks to package list
575Ross Paterson <ross@soi.city.ac.uk>**20070220235601]
576[generate RSS feed of recent updates
577Ross Paterson <ross@soi.city.ac.uk>**20070214185538]
578[bug fix: show preview even if no warnings
579Ross Paterson <ross@soi.city.ac.uk>**20070213180708]
580[check-pkg also returns plain text if requested
581Ross Paterson <ross@soi.city.ac.uk>**20070213001039]
582[for plain text clients, return only the warnings
583Ross Paterson <ross@soi.city.ac.uk>**20070211171633]
584[use CGI type synonym
585Ross Paterson <ross@soi.city.ac.uk>**20070210152353]
586[refactor pkgBody arguments as a record
587Ross Paterson <ross@soi.city.ac.uk>**20070208194243]
588[strip executables
589Ross Paterson <ross@soi.city.ac.uk>**20070207233429]
590[mark property table
591Ross Paterson <ross@soi.city.ac.uk>**20070207233402]
592[point to accounts page
593Ross Paterson <ross@soi.city.ac.uk>**20070207230638]
594[install upload-pkg in the correct place
595Ross Paterson <ross@soi.city.ac.uk>**20070206001525]
596[new location <pkgid>.misc/doc for docs
597Ross Paterson <ross@soi.city.ac.uk>**20070205004623]
598[versioned haddock documentation
599Ross Paterson <ross@soi.city.ac.uk>**20070203202526]
600[if PACKAGE/doc/html exists, module names are links into it
601Ross Paterson <ross@soi.city.ac.uk>**20070203170215
602 (Generation of haddock documentation is not yet automated, though)
603]
604[minor refactoring
605Ross Paterson <ross@soi.city.ac.uk>**20070202121300]
606[change package links from pkg/vers to pkg-vers
607Ross Paterson <ross@soi.city.ac.uk>**20070201143905]
608[package-ids are unambiguous
609Ross Paterson <ross@soi.city.ac.uk>**20070201132112]
610[allow version tags (they seem harmless)
611Ross Paterson <ross@soi.city.ac.uk>**20070201131251]
612[trim long synopses in package list
613Ross Paterson <ross@soi.city.ac.uk>**20070201100052]
614[tag category list
615Ross Paterson <ross@soi.city.ac.uk>**20070131121652]
616[some re-arrangement
617Ross Paterson <ross@soi.city.ac.uk>**20070131003654]
618[add category index to package list
619Ross Paterson <ross@soi.city.ac.uk>**20070130180021]
620[tweak Cabal logo
621Ross Paterson <ross@soi.city.ac.uk>**20070129130941]
622[add Cabal branding to package page
623Ross Paterson <ross@soi.city.ac.uk>**20070129122133]
624[mark package lists with an element class
625Ross Paterson <ross@soi.city.ac.uk>**20070129092724]
626[revert to textual indication of package type
627Ross Paterson <ross@soi.city.ac.uk>**20070129080416]
628[cleanup
629Ross Paterson <ross@soi.city.ac.uk>**20070129025127]
630[more compact presentation of package list
631Ross Paterson <ross@soi.city.ac.uk>**20070129021339]
632[show other versions on package page
633Ross Paterson <ross@soi.city.ac.uk>**20070129020229]
634[move cabalFile to Util
635Ross Paterson <ross@soi.city.ac.uk>**20070129014325]
636[pkg-list: only read the most recent Cabal file for each package
637Ross Paterson <ross@soi.city.ac.uk>**20070129012719]
638[trim unused functions
639Ross Paterson <ross@soi.city.ac.uk>**20070129012355]
640[add export lists for Main modules
641Ross Paterson <ross@soi.city.ac.uk>**20070129012315]
642[fix dependency
643Ross Paterson <ross@soi.city.ac.uk>**20070129005924]
644[refactoring of version search
645Ross Paterson <ross@soi.city.ac.uk>**20070129005845]
646[switch to Text.XHtml
647Ross Paterson <ross@soi.city.ac.uk>**20070129001802]
648[more graceful error on missing package
649Ross Paterson <ross@soi.city.ac.uk>**20070127171227]
650[minor simplification
651Ross Paterson <ross@soi.city.ac.uk>**20070127164406]
652[minor refactoring
653Ross Paterson <ross@soi.city.ac.uk>**20070127143750]
654[shuffle stuff between modules
655Ross Paterson <ross@soi.city.ac.uk>**20070127142603]
656[change install to scp + mv
657Ross Paterson <ross@soi.city.ac.uk>**20070127131030]
658[reword check output
659Ross Paterson <ross@soi.city.ac.uk>**20070127130746]
660[add upload.html
661Ross Paterson <ross@soi.city.ac.uk>**20070126210510]
662[re-order things on package page
663Ross Paterson <ross@soi.city.ac.uk>**20070126204017]
664[minor refactoring
665Ross Paterson <ross@soi.city.ac.uk>**20070126202141]
666[tabulate fields
667Ross Paterson <ross@soi.city.ac.uk>**20070126201050]
668[remove superfluous thehtml
669Ross Paterson <ross@soi.city.ac.uk>**20070126174820]
670[ensure that showPackageId produces the original pkg-id
671Ross Paterson <ross@soi.city.ac.uk>**20070126150901
672 
673 Rule out version numbers like "1.00" -> [1,0] -> "1.0".  These ought to be
674 rejected by the parser.
675]
676[add boilerplate header to each page
677Ross Paterson <ross@soi.city.ac.uk>**20070126143901]
678[remove old form-based parameters to package script
679Ross Paterson <ross@soi.city.ac.uk>**20070126115030]
680[tweak category headings
681Ross Paterson <ross@soi.city.ac.uk>**20070126112054]
682[make package URLs a bit shorter
683Ross Paterson <ross@soi.city.ac.uk>**20070125105147
684 
685 * remove .cgi from CGI scripts in cgi-bin
686 
687 * use PATHINFO instead of form data to identify packages.
688 
689 So now its .../package/<pkg>/<version> or just .../package/<pkg>
690]
691[some refactoring
692Ross Paterson <ross@soi.city.ac.uk>**20070118102430]
693[append a preview of the package page to the check-pkg output
694Ross Paterson <ross@soi.city.ac.uk>**20070118003003]
695[add a README file with overview and install instructions
696Ross Paterson <ross@soi.city.ac.uk>**20070116153445]
697[clean up locations a bit
698Ross Paterson <ross@soi.city.ac.uk>**20070116123020]
699[parse and markup package descriptions with code stolen from Haddock
700Ross Paterson <ross@soi.city.ac.uk>**20070116105520]
701[temporarily downgrade repeated-upload check to a warning
702Ross Paterson <ross@soi.city.ac.uk>**20070116073009
703 
704 The check seems like a good idea in the longer term, but
705 It's a bit cumbersome while we're all still experimenting.
706]
707[more compact log lines
708Ross Paterson <ross@soi.city.ac.uk>**20070113010328]
709[fix previous commit
710Ross Paterson <ross@soi.city.ac.uk>**20070112155632]
711[use errorOutput for error cases
712Ross Paterson <ross@soi.city.ac.uk>**20070112151251]
713[basename: strip to slash or backslash (which IE includes in filenames)
714Ross Paterson <ross@soi.city.ac.uk>**20070112143846]
715[use a different tmp directory for each process
716Ross Paterson <ross@soi.city.ac.uk>**20070111010943]
717[don't accept "Foreign binding" as a category
718Ross Paterson <ross@soi.city.ac.uk>**20070110233221]
719[fix stylesheet location
720Ross Paterson <ross@soi.city.ac.uk>**20070110182307]
721[change locations to match install on hackage.haskell.org
722Ross Paterson <ross@soi.city.ac.uk>**20070110170036]
723[repair post-upload-hook
724Ross Paterson <ross@soi.city.ac.uk>**20070109224215]
725[fallback for category: top-level of module hierarchy
726Ross Paterson <ross@soi.city.ac.uk>**20070109224115]
727[initial import
728Ross Paterson <ross@soi.city.ac.uk>**20070109004703
729 
730 This is a crude first cut at an interface to the Hackage package database:
731 * generating a package list (pkg-list)
732 * page describing a package (package.cgi)
733 * apply basic checks to a Cabal package (check-pkg.cgi)
734 * upload a Cabal package to the database (upload-pkg.cgi)
735]
736Patch bundle hash:
737c162e1d32fe15346fafe35852bf6f718ae62cad0
738-----BEGIN PGP SIGNATURE-----
739Version: GnuPG v1.4.9 (GNU/Linux)
740
741iEYEARECAAYFAkqQIdoACgkQ9ijrk0dDIGxryACcCAQM8luLYTAx5rsymOPC0823
742hukAnimBHsheo4a2leVGyVPXYWfU/bXL
743=dR9s
744-----END PGP SIGNATURE-----