Hello,

I would like to announce the availability of the a library for
interacting with the Debian system. This library does not (currently)
depend on dpkg or apt for any functionality. Contributions are
welcome. You should probably send an email first to make sure you are
not duplicating any of our currently unreleased code.

http://hackage.haskell.org/cgi-bin/hackage-scripts/package/debian-1.2

Well-Support Modules:

 + Parsing/Printing Debian control files using Strings or ByteStrings

 + Parsing/Printing sources.list files (including support for the wacky
   sources.list escaping mechanism)

 + Comparing Debian version numbers. (pure Haskell code, includes
   support for ~).

 + A data type for encoding Debian relations. For example:

    foo (>= 1.2) | bar (<= 3.0), baz

 + Check if a version satisfies a version requirement. For example:

     does 1.2 satisfy (>= 1.1)

Experimental Modules:

 + A dependency resolver. Answers the question:

    Given a relation and a Debian Packages file, what packages do I
    need to install to satisfy the relation. For example, what
    packages do I need to install from sid to satisfy the relation:

         foo, bar (>= 1.1) | baz (>= 1.4)

    There are few things that are not yet handled:

      + proper support for architectures (easy)

      + installing the packages onto an existing system when no
      packages need to be removed. (medium)

      + figuring out what packages to remove from an existing install
      when one or more packages must absolutely be removed in order to
      satisfy the requested relation. This requires user interaction,
      since no heuristic can determine which set of packages you would
      be least upset to see removed from your system. (difficult).

    It is currently suitable for finding packages in a distribution
    that could never be installed, or for creating a chroot that
    contains a certain set of packages.

Coming Soon:

  Linspire.Debian.ChangeLog - a module for parsing Debian
  Changelogs. (Code existis, but needs to be updated to support a
  newer version of the time library)

  A bunch of modules for dealing the Repository management, such as
  creating Packages/Sources files, installing new packages into an
  existing distribution, repository signing and more. These modules
  are largely working, but need to be refactored into standalone
  libraries. They are currently too tightly integrated with the
  autobuilder framework.

  A revision control system agnostic API for checking out source, and
  assigning a 'version' number to the source. With backend support for
  darcs, svn, tla, mercurial, quilt, uri, and apt. These modules also
  need to be pried out of the autobuilder.

Known Issues:

 + Handling of comments in control files is a bit of hack.

 + There is some code which blindly ignores the Architecture. I
 believe this is limited to the Dependencies module. Should be easy to
 rectify.

 + The modules are currently in the Linspire.* module path. This is
 bogus. In the future they will be moved to a more suitable location.

Getting Source / Submitting Patches:

Currently the only way to get the source is through hackage. If there
is demand, we can make the source available via tla or darcs. For now,
just submit any patches as a .diff.

j.

_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to