Opened 9 years ago

Closed 6 years ago

Last modified 5 years ago

#723 closed task (fixed)

The package database should be a directory of files instead of a single file

Reported by: simonmar Owned by:
Priority: normal Milestone: 6.12 branch
Component: Package system Version: 6.4.2
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Test Case: N/A
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

This would help package systems that want to install packages by just unpacking a bunch of files onto the filesystem, amongst other things.

See: http://www.haskell.org//pipermail/glasgow-haskell-users/2006-March/009838.html

Change History (10)

comment:1 Changed 9 years ago by simonmar

Comments from Duncan Coutts:

One downside to using a dir approach is that it makes it harder to
optimise the format of these files (since they do take a little while to
parse).

One could use a binary format for the installed files, but it still
means opening several small files. That's probably the sweet-spot for
performance/effort. It might be possible to keep the package.conf files
in the nice cabal text formal and then build a cache. However it's not
obvious where such a cache would go. It could go in the users ~/.ghc
directory but that will not work well for the root user. For example on
gentoo and debian updating such a cache would cause a sandbox violation
during a build.

So for example we could use ghc-pkg to install into a given package db
dir and it could write the binary format file:

ghc-pkg register foo.pkg -f buildtmp/package.conf.d/ --force

On a related note, we sadly have to use --force in this instance since
we're installing into a temp dir so the directories do not exist yet in
the real root file system. We could avoid --force with {{{--pkg-root=
${DESTDIR}}}} or something, but it'd need more complexity in ghc-pkg.

comment:2 Changed 9 years ago by greenrd@…

  • Owner set to guest
  • Status changed from new to assigned
  • Version changed from 6.4.1 to 6.4.2

I'm packaging Haskell stuff for rPath Linux, and I'm going to look into implementing at least the splitting out part of this task.

comment:3 Changed 9 years ago by igloo

  • Milestone set to 6.8
  • Test Case set to N/A

comment:4 Changed 7 years ago by simonmar

  • Milestone changed from 6.8 branch to 6.10 branch
  • Owner guest deleted
  • Status changed from assigned to new

See also #593

comment:5 Changed 7 years ago by simonmar

  • Architecture changed from Unknown to Unknown/Multiple

comment:6 Changed 7 years ago by simonmar

  • Operating System changed from Unknown to Unknown/Multiple

comment:7 Changed 6 years ago by igloo

  • Milestone changed from 6.10 branch to 6.12 branch

comment:8 Changed 6 years ago by simonmar

  • Component changed from Compiler to Package system

comment:9 Changed 6 years ago by simonmar

  • Resolution set to fixed
  • Status changed from new to closed

The package DB is now a directory of files by default (the old text-file format is still supported).

Thu Sep 10 03:27:03 PDT 2009  Simon Marlow <[email protected]>
  * Change the representation of the package database
  Ignore-this: 7c9b38ded7f753d5bb95743695700dbc
  
   - the package DB is a directory containing one file per package
     instance (#723)
  
   - there is a binary cache of the database (#593, #2089)
  
   - the binary package is now a boot package
  
   - there is a new package, bin-package-db, containing the Binary
     instance of InstalledPackageInfo for the binary cache.
  
  Also included in this patch
  
   - Use colour in 'ghc-pkg list' to indicate broken or hidden packages
    
     Broken packages are red, hidden packages are 
    
     Colour support comes from the terminfo package, and is only used when
      - not --simple-output
      - stdout is a TTY
      - the terminal type has colour capability
  
   - Fix the bug that 'ghc-pkg list --user' shows everything as broken

comment:10 Changed 5 years ago by simonmar

  • difficulty changed from Moderate (1 day) to Moderate (less than a day)
Note: See TracTickets for help on using tickets.