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.
On Tue, Apr 03, 2007 at 01:00:07PM -0700, Jeremy Shaw wrote:
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.
Sounds like your duplicating a lot of the functionality of jgoerzen's MissingH library. http://software.complete.org/missingh Not all of your functionality is subsumed, but he has a control-file parser and a version type too.
At Tue, 3 Apr 2007 13:04:36 -0700,
Sounds like your duplicating a lot of the functionality of jgoerzen's MissingH library. http://software.complete.org/missingh
yes. but better ;)
Not all of your functionality is subsumed, but he has a control-file parser and a version type too.
Yes and no. There are a few key differences, unless there is a newer version of his library that I do not know about. Our debian/control parser works with ByteStrings and Strings. When parsing an 18MB Packages file, there is a significant difference in speed/mem usage. The Strings version takes around 180MB of RAM and 30 secs. The ByteString takes around 20MB and less than one second. (hoo-ray for ByteString!) Also, I believe John's Debian version compare function just calls: dpkg --compare-versions and his DebVersion is defined as
newtype DebianVersion = DebVersion String
And the Ord instance uses unsafePerformIO to call 'dpkg --compare-versions'. So, his library has some portability and scalability issues. Also, our library has a beefier API. Anyway, the point of releasing our library (and making it BSD3) is to avoid any further duplication of effort :) j. ps. I hope this doesn't sound like I am ragging on John. He has some fine libraries, which we happily use. His Debian library was just not quite what we needed.
On Tue, Apr 03, 2007 at 03:04:51PM -0700, Jeremy Shaw wrote:
At Tue, 3 Apr 2007 13:04:36 -0700,
Sounds like your duplicating a lot of the functionality of jgoerzen's MissingH library. http://software.complete.org/missingh
yes. but better ;)
Ok then.
Not all of your functionality is subsumed, but he has a control-file parser and a version type too.
Yes and no. There are a few key differences, unless there is a newer version of his library that I do not know about.
Our debian/control parser works with ByteStrings and Strings. When parsing an 18MB Packages file, there is a significant difference in speed/mem usage. The Strings version takes around 180MB of RAM and 30 secs. The ByteString takes around 20MB and less than one second. (hoo-ray for ByteString!)
Oh, packages! Here and I was thinking "If debian/control is big enough to need bytestrings, you've got bigger problems." Stefan.
On 2007-04-03, Jeremy Shaw <jeremy.shaw@linspireinc.com> wrote:
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.
This sounds sweet. I could probably deprecate the Debian code in MissingH now. I had been meaning to split it off into its own library anyway. I would really like to see you make the source tree available with darcs or hg. (No offense, but tla? what were you thinking? <grin>) -- John
participants (3)
-
Jeremy Shaw -
John Goerzen -
Stefan O'Rear