[Hackage] #174: cabal-install tries to upgrade the base package

#174: cabal-install tries to upgrade the base package ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.2.0 Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.6 Platform: Linux | ----------------------------+----------------------------------------------- When using ghc-6.6.x, with some packages, cabal-install tries to upgrade the base package to satisfy dependnecies. This is obviously impossible. The dependency resolution mechanism needs to be taught this fact. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/174 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

When using ghc-6.6.x, with some packages, cabal-install tries to upgrade
#174: cabal-install tries to upgrade the base package ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.6 | Platform: Linux ----------------------------+----------------------------------------------- Comment (by guest): Replying to [ticket:174 duncan]: the base package to satisfy dependnecies. This is obviously impossible. The dependency resolution mechanism needs to be taught this fact. Here's what I tried: $ cabal install fastcgi Data/List.hs:18:1: lexical error at character 'i' $ cabal info fastcgi Requested: fastcgi -any Using: fastcgi-3000.0.0 Depends: base >=2.0, cgi >=3000.0.0 Options: Location: http://hackage.haskell.org/packages/archive/fastcgi/3000.0.0/fastcgi-3000.0.... Local: *Not downloaded Requested: base >=2.0 Installed: base-2.1.1 Requested: cgi >=3000.0.0 Using: cgi-3001.1.5.1 Depends: base >=3, old-time -any, old-locale -any, containers -any, base >=2&&<3, network >=2.0, parsec >=2.0, mtl >=1.0, xhtml >=3000.0.0 Options: Location: http://hackage.haskell.org/packages/archive/cgi/3001.1.5.1/cgi-3001.1.5.1.ta... Local: *Not downloaded Requested: base >=3 Using: base-3.0.0.0 Depends: Options: Location: http://hackage.haskell.org/packages/archive/base/3.0.0.0/base-3.0.0.0.tar.gz Local: /home/abram/.cabal/packages/hackage.haskell.org/base/3.0.0.0/base-3.0.0.0.tar.gz Requested: old-time -any Using: old-time-1.0.0.0 Depends: base -any, old-locale -any Options: Location: http://hackage.haskell.org/packages/archive/old- time/1.0.0.0/old-time-1.0.0.0.tar.gz Local: *Not downloaded Requested: base -any Installed: base-2.1.1 Requested: old-locale -any Using: old-locale-1.0.0.0 Depends: base -any Options: Location: http://hackage.haskell.org/packages/archive/old- locale/1.0.0.0/old-locale-1.0.0.0.tar.gz Local: *Not downloaded Requested: containers -any Using: containers-0.1.0.0 Depends: base -any, array -any Options: Location: http://hackage.haskell.org/packages/archive/containers/0.1.0.0/containers-0.... Local: *Not downloaded Requested: array -any Using: array-0.1.0.0 Depends: base -any Options: Location: http://hackage.haskell.org/packages/archive/array/0.1.0.0/array-0.1.0.0.tar.... Local: *Not downloaded Requested: base >=2&&<3 Installed: base-2.1.1 Requested: network >=2.0 Installed: network-2.1.0.0 Requested: parsec >=2.0 Installed: parsec-2.0 Requested: mtl >=1.0 Installed: mtl-1.1.0.0 Requested: xhtml >=3000.0.0 Using: xhtml-3000.0.2.1 Depends: base -any Options: Location: http://hackage.haskell.org/packages/archive/xhtml/3000.0.2.1/xhtml-3000.0.2.... Local: *Not downloaded These packages would be installed: base-3.0.0.0, old-locale-1.0.0.0, old-time-1.0.0.0, array-0.1.0.0, containers-0.1.0.0, xhtml-3000.0.2.1, cgi-3001.1.5.1, fastcgi-3000.0.0 -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/174#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#174: cabal-install tries to upgrade the base package ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.6 | Platform: Linux ----------------------------+----------------------------------------------- Comment (by ross@soi.city.ac.uk): Maybe base-3.0.0.0 should be removed from HackageDB. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/174#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#174: cabal-install tries to upgrade the base package ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.6 | Platform: Linux ----------------------------+----------------------------------------------- Comment (by duncan): Replying to [comment:2 ross@soi.city.ac.uk]:
Maybe base-3.0.0.0 should be removed from HackageDB.
I don't think that is the problem. Look at the output of cabal info, it thinks cgi depends on two versions of the base lib. It's just flattening the configurations incorrectly. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/174#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#174: cabal-install tries to upgrade the base package ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.6 | Platform: Linux ----------------------------+----------------------------------------------- Comment (by guest): There are a number of issues here: * base should not be in HackageDB, since it is impossible to upgrade it. * The cgi package has been updated to use configurations to work with both base-2 and base-3, but fastcgi hasn't (it is updated in darcs, I just haven't gotten around to uploading it). * cabal-install picks the first working configuration. This has the result that fastcgi which dependes on base >= 2.0 is configured to use the ''installed'' base-2.1.1, and cgi which can use either base version is configured to use the ''available'' base-3.0.0. If base was not in HackageDB, cgi would be configured correctly. There is a bug here, but it is not that configurations are flattened incorrectly. Rather, the problem is that cabal-install does not backtrack in the dependency resolution if it encounters an uninstallable package. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/174#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#174: cabal-install tries to upgrade the base package ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install | Version: 1.2.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.6 | Platform: Linux ----------------------------+----------------------------------------------- Comment (by ross@soi.city.ac.uk): I added base-3.0.0.0 because I hoped to build Hugs with released packages. However the package doesn't work for that purpose, so I've removed it. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/174#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#174: cabal-install tries to upgrade the base package ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.2.2.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.6 | Platform: Linux ---------------------------------+------------------------------------------ Comment (by duncan): This is now trivial to fix. We just exclude all versions of the `base` package from the index of available packages that we hand to the dependency resolver: {{{ dependencyResolver resolver os arch comp installed available deps = ! case resolver os arch comp (hideBrokenPackages installed) available deps of Left unresolved -> Left unresolved --- 87,91 ---- dependencyResolver resolver os arch comp installed available deps = ! let installed' = hideBrokenPackages installed ! available' = hideBasePackage available ! in case resolver os arch comp installed' available' deps of }}} That encodes the fact that although the base package may be available, we cannot actually rebuild the base package or install any new version of it. We should probably do the same for any other magic builtin ghc packages that are not upgradable. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/174#comment:6 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#174: cabal-install tries to upgrade the base package
---------------------------------+------------------------------------------
Reporter: duncan | Owner:
Type: defect | Status: closed
Priority: normal | Milestone:
Component: cabal-install tool | Version: 1.2.2.0
Severity: normal | Resolution: fixed
Keywords: | Difficulty: normal
Ghcversion: 6.6 | Platform: Linux
---------------------------------+------------------------------------------
Changes (by duncan):
* status: new => closed
* resolution: => fixed
Comment:
{{{
Wed May 21 16:37:00 BST 2008 Duncan Coutts
participants (1)
-
Hackage