darcs patch: Add a unuque identifier for installed packages

I'd appreciate a review of the enclosed patch. Below is a session showing how with the patch (and accompanying GHC changes) we detect broken packages after a dependency has been recompiled. ~/builds/testing > ./inplace/bin/ghc-pkg list /64playpen/simonmar/testing/inplace/lib/package.conf: Cabal-1.7.2, array-0.2.0.1, base-3.0.3.0, base-4.1.0.0, bytestring-0.9.1.4, containers-0.2.0.1, directory-1.0.0.2, (dph-base-0.4.0), (dph-par-0.4.0), (dph-prim-interface-0.4.0), (dph-prim-par-0.4.0), (dph-prim-seq-0.4.0), (dph-seq-0.4.0), extensible-exceptions-0.1.1.0, ffi-1.0, filepath-1.1.0.1, (ghc-6.11.20090703), ghc-prim-0.1.0.0, haskeline-0.6.1.6, haskell98-1.0.1.0, hpc-0.5.0.2, integer-0.1.0.0, integer-gmp-0.1.0.0, mtl-1.1.0.2, old-locale-1.0.0.1, old-time-1.0.0.1, pretty-1.0.1.0, process-1.0.1.1, random-1.0.0.1, rts-1.0, syb-0.1.0.0, template-haskell-2.4.0.0, terminfo-0.3.1, unix-2.3.1.0, utf8-string-0.3.4 ~/builds/testing > ./inplace/bin/ghc-pkg check ~/builds/testing > cd libraries/filepath ~/builds/testing/libraries/filepath > ../../inplace/bin/ghc-stage2 --make Setup Linking Setup ... ~/builds/testing/libraries/filepath > ./Setup configure --with-ghc=$HOME/builds/testing/inplace/bin/ghc-stage2 Configuring filepath-1.1.0.1... ~/builds/testing/libraries/filepath > ./Setup build && ./Setup register --inplace Preprocessing library filepath-1.1.0.1... Building filepath-1.1.0.1... Registering filepath-1.1.0.1... Reading package info from "dist/inplace-pkg-config" ... done. Writing new package config file... done. Registering filepath-1.1.0.1... Reading package info from "dist/inplace-pkg-config" ... done. Writing new package config file... done. ~/builds/testing/libraries/filepath > ../.. ~/builds/testing > ./inplace/bin/ghc-pkg list WARNING: there are broken packages. Run 'ghc-pkg check' for more details. /64playpen/simonmar/testing/inplace/lib/package.conf: {Cabal-1.7.2}, array-0.2.0.1, base-3.0.3.0, base-4.1.0.0, bytestring-0.9.1.4, containers-0.2.0.1, {directory-1.0.0.2}, (dph-base-0.4.0), (dph-par-0.4.0), (dph-prim-interface-0.4.0), (dph-prim-par-0.4.0), (dph-prim-seq-0.4.0), (dph-seq-0.4.0), extensible-exceptions-0.1.1.0, ffi-1.0, filepath-1.1.0.1, {ghc-6.11.20090703}, ghc-prim-0.1.0.0, {haskeline-0.6.1.6}, {haskell98-1.0.1.0}, {hpc-0.5.0.2}, integer-0.1.0.0, integer-gmp-0.1.0.0, mtl-1.1.0.2, old-locale-1.0.0.1, old-time-1.0.0.1, pretty-1.0.1.0, {process-1.0.1.1}, random-1.0.0.1, rts-1.0, syb-0.1.0.0, template-haskell-2.4.0.0, terminfo-0.3.1, unix-2.3.1.0, utf8-string-0.3.4 ~/builds/testing > ./inplace/bin/ghc-pkg check There are problems in package directory-1.0.0.2: dependency "filepath-1.1.0.1-5IakEwOI9" doesn't exist There are problems in package process-1.0.1.1: dependency "filepath-1.1.0.1-5IakEwOI9" doesn't exist There are problems in package Cabal-1.7.2: dependency "filepath-1.1.0.1-5IakEwOI9" doesn't exist There are problems in package haskeline-0.6.1.6: dependency "filepath-1.1.0.1-5IakEwOI9" doesn't exist There are problems in package ghc-6.11.20090703: dependency "filepath-1.1.0.1-5IakEwOI9" doesn't exist The following packages are broken, either because they have a problem listed above, or because they depend on a broken package. directory-1.0.0.2 process-1.0.1.1 Cabal-1.7.2 haskeline-0.6.1.6 ghc-6.11.20090703 haskell98-1.0.1.0 hpc-0.5.0.2 [2] 7453 exit 1 ./inplace/bin/ghc-pkg check ~/builds/testing > ./inplace/bin/ghc-pkg list -v WARNING: there are broken packages. Run 'ghc-pkg check' for more details. /64playpen/simonmar/testing/inplace/lib/package.conf: {Cabal-1.7.2 (Cabal-1.7.2-5IakGheup)} array-0.2.0.1 (array-0.2.0.1-5IakEzN80) base-3.0.3.0 (base-3.0.3.0-5IakGe0zo) base-4.1.0.0 (base-4.1.0.0-5IakEtPs2) bytestring-0.9.1.4 (bytestring-0.9.1.4-5IakECMeZ) containers-0.2.0.1 (containers-0.2.0.1-5IakEFK5I) {directory-1.0.0.2 (directory-1.0.0.2-5IakFDqK1)} (dph-base-0.4.0 (dph-base-0.4.0-5IakGCVou)) (dph-par-0.4.0 (dph-par-0.4.0-5IakGSiqb)) (dph-prim-interface-0.4.0 (dph-prim-interface-0.4.0-5IakGFV6y)) (dph-prim-par-0.4.0 (dph-prim-par-0.4.0-5IakGM4H9)) (dph-prim-seq-0.4.0 (dph-prim-seq-0.4.0-5IakGIYWl)) (dph-seq-0.4.0 (dph-seq-0.4.0-5IakGP8Nl)) extensible-exceptions-0.1.1.0 (extensible-exceptions-0.1.1.0-5IakFVTIC) ffi-1.0 (builtin:ffi) filepath-1.1.0.1 (filepath-1.1.0.1-5Ial8X9q5) {ghc-6.11.20090703 (ghc-6.11.20090703-5IakJc5Uy)} ghc-prim-0.1.0.0 (ghc-prim-0.1.0.0-5IakCWK3q) {haskeline-0.6.1.6 (haskeline-0.6.1.6-5IakGzW5h)} {haskell98-1.0.1.0 (haskell98-1.0.1.0-5IakFYWrS)} {hpc-0.5.0.2 (hpc-0.5.0.2-5IakG20OG)} integer-0.1.0.0 (integer-0.1.0.0-5IakDkwPn) integer-gmp-0.1.0.0 (integer-gmp-0.1.0.0-5IakDhEG6) mtl-1.1.0.2 (mtl-1.1.0.2-5IakGkbvo) old-locale-1.0.0.1 (old-locale-1.0.0.1-5IakFiRP3) old-time-1.0.0.1 (old-time-1.0.0.1-5IakFuJcF) pretty-1.0.1.0 (pretty-1.0.1.0-5IakG4YAN) {process-1.0.1.1 (process-1.0.1.1-5IakFPZiP)} random-1.0.0.1 (random-1.0.0.1-5IakFSX7S) rts-1.0 (builtin:rts) syb-0.1.0.0 (syb-0.1.0.0-5IakG7XEC) template-haskell-2.4.0.0 (template-haskell-2.4.0.0-5IakGaYAW) terminfo-0.3.1 (terminfo-0.3.1-5IakGwMb2) unix-2.3.1.0 (unix-2.3.1.0-5IakFfXxR) utf8-string-0.3.4 (utf8-string-0.3.4-5IakGn9gQ)
participants (1)
-
Simon Marlow