This is only locally tested in a copy of the archive.

Sun Mar  2 19:42:01 GMT 2008  Duncan Coutts <[EMAIL PROTECTED]>
  * Try to replace the index file atomically.
  Using gzip > file means the file is created/replaced at the begining of the
  procedure, so for the period until it finishes the index file is in fact
  invalid. So re-generate the index into a temp file and then atomically rename.
  This does not make the regeneration totally atomic since while it is being
  generated, other files could be being added to the archive.

BTW, could we set the 'darcs send' email address for the hackage-scripts repo
so it works automagically. Would it also make sense for changes in the
hackage-scripts to be sent to cabal-devel, like for the Cabal and
cabal-install repos?

Duncan

New patches:

[Try to replace the index file atomically.
Duncan Coutts <[EMAIL PROTECTED]>**20080302194201
 Using gzip > file means the file is created/replaced at the begining of the
 procedure, so for the period until it finishes the index file is in fact
 invalid. So re-generate the index into a temp file and then atomically rename.
 This does not make the regeneration totally atomic since while it is being
 generated, other files could be being added to the archive.
] {
hunk ./post-upload-hook 17
-cd $archive
+cd $archive || exit 1
hunk ./post-upload-hook 20
+# Replace the index file atomically
+TMPFILE=`mktemp 00-index.tmp.XXXXXXXXXX` || exit 1
hunk ./post-upload-hook 23
-	tar -c -T - -f - | gzip -9 >00-index.tar.gz &
+	tar -c -T - -f - | gzip -9 > ${TMPFILE} &&
+	mv ${TMPFILE} 00-index.tar.gz &
}

Context:

[generate 00-index.tar.gz asynchronously
Ross Paterson <[EMAIL PROTECTED]>**20080302105639] 
[prune the search for cabal files to make it go faster
Ross Paterson <[EMAIL PROTECTED]>**20080302105432] 
[add small latest-versions lister
Ross Paterson <[EMAIL PROTECTED]>**20080221134229] 
[use absolute filenames when looking for packages
Ross Paterson <[EMAIL PROTECTED]>**20080221124040] 
[longer label on the search button
Ross Paterson <[EMAIL PROTECTED]>**20080221123956] 
[simple implementation of tags, starting with upload info
Ross Paterson <[EMAIL PROTECTED]>**20080216021131] 
[swap arguments to extraChecks
Ross Paterson <[EMAIL PROTECTED]>**20080214182808] 
[fix warning
Ross Paterson <[EMAIL PROTECTED]>**20080214182753] 
[Update to latest Cabal lib API and use new package checking code
Duncan Coutts <[EMAIL PROTECTED]>**20080213201347
 Compiles but otherwise totally untested.
] 
[remove private copies of functions now in ghc 6.8
Ross Paterson <[EMAIL PROTECTED]>**20080212011430] 
[introduce PublicFile for files visible through the web
Ross Paterson <[EMAIL PROTECTED]>**20080212005643] 
[refactoring of upload and check scripts
Ross Paterson <[EMAIL PROTECTED]>**20080211131109] 
[unpack the whole directory, not just the .cabal file
Ross Paterson <[EMAIL PROTECTED]>**20080211131009] 
[add a Google search box to the package list page
Ross Paterson <[EMAIL PROTECTED]>**20080203021954] 
[swap depends-on and required-by maps
Ross Paterson <[EMAIL PROTECTED]>**20080202012507] 
[list successful and unsuccessful builds, with logs
Ross Paterson <[EMAIL PROTECTED]>**20080126013443] 
[blacklist Application, Tool and Type categories
Ross Paterson <[EMAIL PROTECTED]>**20071213074800] 
[add author
Ross Paterson <[EMAIL PROTECTED]>**20071213074632] 
[correct and simplify the library and programs test
Ross Paterson <[EMAIL PROTECTED]>**20071210104009] 
[capitalize category names
Ross Paterson <[EMAIL PROTECTED]>**20071130143321] 
[merge category names that differ only in case
Ross Paterson <[EMAIL PROTECTED]>**20071130142342] 
[render equality constraints concisely
Ross Paterson <[EMAIL PROTECTED]>**20071128005652] 
[ignore case when sorting lists of dependent packages
Ross Paterson <[EMAIL PROTECTED]>**20071120123549] 
[display dependencies in disjunctive normal form
Ross Paterson <[EMAIL PROTECTED]>**20071024225216] 
[Oops, need the flattened package description to get exposed modules and executables
Ross Paterson <[EMAIL PROTECTED]>**20071024070848] 
[use GenericPackageDescription instead of PackageDescription
Ross Paterson <[EMAIL PROTECTED]>**20071024064933] 
[now need Cabal >= 1.2.1
Ross Paterson <[EMAIL PROTECTED]>**20071021155643] 
[update for Cabal 1.2.1
Ross Paterson <[EMAIL PROTECTED]>**20071021155322] 
[cabal packaging (based on work of Trevor Elliott)
Ross Paterson <[EMAIL PROTECTED]>**20071019124210] 
[also install search
Ross Paterson <[EMAIL PROTECTED]>**20070909185526] 
[Added search functionality (by Sascha Böhme), but not yet in main menu
Ross Paterson <[EMAIL PROTECTED]>**20070909140603] 
[update for Cabal-1.2
Ross Paterson <[EMAIL PROTECTED]>**20070907234506] 
[ensure the package list contains latest versions, plus some refacting
Ross Paterson <[EMAIL PROTECTED]>**20070723204248] 
[add link to build log to package page
Ross Paterson <[EMAIL PROTECTED]>**20070720124702] 
[minor build updates
Ross Paterson <[EMAIL PROTECTED]>**20070617213315] 
[fix rendering of identifiers
Ross Paterson <[EMAIL PROTECTED]>**20070617213249] 
[add missing file
Ross Paterson <[EMAIL PROTECTED]>**20070530140019] 
[bugfix for previous commit
Ross Paterson <[EMAIL PROTECTED]>**20070510142803] 
[fix error in building index
Ross Paterson <[EMAIL PROTECTED]>**20070508165611] 
[include a package in the list only if it has a Cabal file
Ross Paterson <[EMAIL PROTECTED]>**20070506180938] 
[change the directory layout of the HackageDB data
Ross Paterson <[EMAIL PROTECTED]>**20070506151844
 
 Put version in a separate directory (to simplify future expansion).
 This will not affect users of the web interface, but will be a breaking
 change for those who reference the files directly, notably cabal-install.
 
 Here's how the positions of the files of the binary package change
 (-> denotes a symbolic link):
 
 Old layout                              New layout
 --------------------------------------------------------------------
 binary/binary-0.2.cabal                 binary/0.2/binary.cabal
 binary/binary-0.2.tar.gz                binary/0.2/binary-0.2.tar.gz
 binary/binary-0.2.misc/doc/html/        binary/0.2/doc/html/
 binary/binary-0.3.cabal                 binary/0.3/binary.cabal
 binary/binary-0.3.tar.gz                binary/0.3/binary-0.3.tar.gz
 binary/binary-0.3.misc/doc/html/        binary/0.3/doc/html/
 binary/latest.misc -> binary-0.3.misc   binary/latest -> 0.3
] 
[catch "Unclassified" category
Ross Paterson <[EMAIL PROTECTED]>**20070307011355] 
[use local copy of Cabal logo
Ross Paterson <[EMAIL PROTECTED]>**20070225125801] 
[make "recent additions" a generated page instead of a CGI script
Ross Paterson <[EMAIL PROTECTED]>**20070220235702] 
[tweaks to package list
Ross Paterson <[EMAIL PROTECTED]>**20070220235601] 
[generate RSS feed of recent updates
Ross Paterson <[EMAIL PROTECTED]>**20070214185538] 
[bug fix: show preview even if no warnings
Ross Paterson <[EMAIL PROTECTED]>**20070213180708] 
[check-pkg also returns plain text if requested
Ross Paterson <[EMAIL PROTECTED]>**20070213001039] 
[for plain text clients, return only the warnings
Ross Paterson <[EMAIL PROTECTED]>**20070211171633] 
[use CGI type synonym
Ross Paterson <[EMAIL PROTECTED]>**20070210152353] 
[refactor pkgBody arguments as a record
Ross Paterson <[EMAIL PROTECTED]>**20070208194243] 
[strip executables
Ross Paterson <[EMAIL PROTECTED]>**20070207233429] 
[mark property table
Ross Paterson <[EMAIL PROTECTED]>**20070207233402] 
[point to accounts page
Ross Paterson <[EMAIL PROTECTED]>**20070207230638] 
[install upload-pkg in the correct place
Ross Paterson <[EMAIL PROTECTED]>**20070206001525] 
[new location <pkgid>.misc/doc for docs
Ross Paterson <[EMAIL PROTECTED]>**20070205004623] 
[versioned haddock documentation
Ross Paterson <[EMAIL PROTECTED]>**20070203202526] 
[if PACKAGE/doc/html exists, module names are links into it
Ross Paterson <[EMAIL PROTECTED]>**20070203170215
 (Generation of haddock documentation is not yet automated, though)
] 
[minor refactoring
Ross Paterson <[EMAIL PROTECTED]>**20070202121300] 
[change package links from pkg/vers to pkg-vers
Ross Paterson <[EMAIL PROTECTED]>**20070201143905] 
[package-ids are unambiguous
Ross Paterson <[EMAIL PROTECTED]>**20070201132112] 
[allow version tags (they seem harmless)
Ross Paterson <[EMAIL PROTECTED]>**20070201131251] 
[trim long synopses in package list
Ross Paterson <[EMAIL PROTECTED]>**20070201100052] 
[tag category list
Ross Paterson <[EMAIL PROTECTED]>**20070131121652] 
[some re-arrangement
Ross Paterson <[EMAIL PROTECTED]>**20070131003654] 
[add category index to package list
Ross Paterson <[EMAIL PROTECTED]>**20070130180021] 
[tweak Cabal logo
Ross Paterson <[EMAIL PROTECTED]>**20070129130941] 
[add Cabal branding to package page
Ross Paterson <[EMAIL PROTECTED]>**20070129122133] 
[mark package lists with an element class
Ross Paterson <[EMAIL PROTECTED]>**20070129092724] 
[revert to textual indication of package type
Ross Paterson <[EMAIL PROTECTED]>**20070129080416] 
[cleanup
Ross Paterson <[EMAIL PROTECTED]>**20070129025127] 
[more compact presentation of package list
Ross Paterson <[EMAIL PROTECTED]>**20070129021339] 
[show other versions on package page
Ross Paterson <[EMAIL PROTECTED]>**20070129020229] 
[move cabalFile to Util
Ross Paterson <[EMAIL PROTECTED]>**20070129014325] 
[pkg-list: only read the most recent Cabal file for each package
Ross Paterson <[EMAIL PROTECTED]>**20070129012719] 
[trim unused functions
Ross Paterson <[EMAIL PROTECTED]>**20070129012355] 
[add export lists for Main modules
Ross Paterson <[EMAIL PROTECTED]>**20070129012315] 
[fix dependency
Ross Paterson <[EMAIL PROTECTED]>**20070129005924] 
[refactoring of version search
Ross Paterson <[EMAIL PROTECTED]>**20070129005845] 
[switch to Text.XHtml
Ross Paterson <[EMAIL PROTECTED]>**20070129001802] 
[more graceful error on missing package
Ross Paterson <[EMAIL PROTECTED]>**20070127171227] 
[minor simplification
Ross Paterson <[EMAIL PROTECTED]>**20070127164406] 
[minor refactoring
Ross Paterson <[EMAIL PROTECTED]>**20070127143750] 
[shuffle stuff between modules
Ross Paterson <[EMAIL PROTECTED]>**20070127142603] 
[change install to scp + mv
Ross Paterson <[EMAIL PROTECTED]>**20070127131030] 
[reword check output
Ross Paterson <[EMAIL PROTECTED]>**20070127130746] 
[add upload.html
Ross Paterson <[EMAIL PROTECTED]>**20070126210510] 
[re-order things on package page
Ross Paterson <[EMAIL PROTECTED]>**20070126204017] 
[minor refactoring
Ross Paterson <[EMAIL PROTECTED]>**20070126202141] 
[tabulate fields
Ross Paterson <[EMAIL PROTECTED]>**20070126201050] 
[remove superfluous thehtml
Ross Paterson <[EMAIL PROTECTED]>**20070126174820] 
[ensure that showPackageId produces the original pkg-id
Ross Paterson <[EMAIL PROTECTED]>**20070126150901
 
 Rule out version numbers like "1.00" -> [1,0] -> "1.0".  These ought to be
 rejected by the parser.
] 
[add boilerplate header to each page
Ross Paterson <[EMAIL PROTECTED]>**20070126143901] 
[remove old form-based parameters to package script
Ross Paterson <[EMAIL PROTECTED]>**20070126115030] 
[tweak category headings
Ross Paterson <[EMAIL PROTECTED]>**20070126112054] 
[make package URLs a bit shorter
Ross Paterson <[EMAIL PROTECTED]>**20070125105147
 
 * remove .cgi from CGI scripts in cgi-bin
 
 * use PATHINFO instead of form data to identify packages.
 
 So now its .../package/<pkg>/<version> or just .../package/<pkg>
] 
[some refactoring
Ross Paterson <[EMAIL PROTECTED]>**20070118102430] 
[append a preview of the package page to the check-pkg output
Ross Paterson <[EMAIL PROTECTED]>**20070118003003] 
[add a README file with overview and install instructions
Ross Paterson <[EMAIL PROTECTED]>**20070116153445] 
[clean up locations a bit
Ross Paterson <[EMAIL PROTECTED]>**20070116123020] 
[parse and markup package descriptions with code stolen from Haddock
Ross Paterson <[EMAIL PROTECTED]>**20070116105520] 
[temporarily downgrade repeated-upload check to a warning
Ross Paterson <[EMAIL PROTECTED]>**20070116073009
 
 The check seems like a good idea in the longer term, but
 It's a bit cumbersome while we're all still experimenting.
] 
[more compact log lines
Ross Paterson <[EMAIL PROTECTED]>**20070113010328] 
[fix previous commit
Ross Paterson <[EMAIL PROTECTED]>**20070112155632] 
[use errorOutput for error cases
Ross Paterson <[EMAIL PROTECTED]>**20070112151251] 
[basename: strip to slash or backslash (which IE includes in filenames)
Ross Paterson <[EMAIL PROTECTED]>**20070112143846] 
[use a different tmp directory for each process
Ross Paterson <[EMAIL PROTECTED]>**20070111010943] 
[don't accept "Foreign binding" as a category
Ross Paterson <[EMAIL PROTECTED]>**20070110233221] 
[fix stylesheet location
Ross Paterson <[EMAIL PROTECTED]>**20070110182307] 
[change locations to match install on hackage.haskell.org
Ross Paterson <[EMAIL PROTECTED]>**20070110170036] 
[repair post-upload-hook
Ross Paterson <[EMAIL PROTECTED]>**20070109224215] 
[fallback for category: top-level of module hierarchy
Ross Paterson <[EMAIL PROTECTED]>**20070109224115] 
[initial import
Ross Paterson <[EMAIL PROTECTED]>**20070109004703
 
 This is a crude first cut at an interface to the Hackage package database:
 * generating a package list (pkg-list)
 * page describing a package (package.cgi)
 * apply basic checks to a Cabal package (check-pkg.cgi)
 * upload a Cabal package to the database (upload-pkg.cgi)
] 
Patch bundle hash:
2af51335a6d4feb693ba3402b474ebf3def832b2
_______________________________________________
cabal-devel mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cabal-devel

Reply via email to