Re: ANN: cabal-debian et el
On Mon, Apr 6, 2009 at 1:18 PM, David Fox <ddssff@gmail.com> wrote:
> On Sun, Apr 5, 2009 at 11:18 PM, Magnus Therning <magnus@therning.org>
> wrote:
>>
>> David Fox wrote:
>> > On Sun, Apr 5, 2009 at 3:14 PM, Magnus Therning <magnus@therning.org
>> > <mailto:magnus@therning.org>> wrote:
>> >
>> > Jeremy Shaw wrote:
>> > > Hello,
>> > >
>> > > Having received no negative feedback, I uploaded the latest
>> > version of
>> > > cabal-debian to hackage. cabal-debian is part of the debian
>> > package
>> > > which features:
>> >
>> > As you know I do like the idea of cabal-debian. There's one thing
>> > that
>> > I wonder over though, why do I have to have all the dependencies of
>> > a
>> > package installed in order to debianize it?
>> >
>> > % ~/.cabal/bin/cabal-debian --debianize
>> > cabal-debian: finalize failed: [Dependency (PackageName "HTTP")
>> > (IntersectVersionRanges (UnionVersionRanges (ThisVersion (Version
>> > {versionBranch = [4000,0,2], versionTags = []})) (LaterVersion
>> > (Version
>> > {versionBranch = [4000,0,2], versionTags = []}))) (EarlierVersion
>> > (Version
>> > {versionBranch = [4001], versionTags = []})))]
>> >
>> > /M
>> >
>> >
>> > That message means that finalizePackageDescription in the Cabal library
>> > failed. If that fails it doesn't have a packageDescription, which I
>> > think is the parsed version of the cabal file plus more computed
>> > information. Cabal-debian gets lots of info from the package
>> > description: the license file, the dependencies, the list of
>> > executables, and so on. And the fact that the cabal file is valid...
>>
>> Yes, I understand that. However, that message is what I get when I run
>> `cabal-debian --debianize` on _cabal-install_ without having HTTP
>> installed. Why do I need to have all of cabal-install's dependencies
>> installed in order to run `cabal-debian --debianize` on it?
>
> Only because cabal-debian calls cabal to load the package information, and
> cabal fails if the dependencies aren't installed.
What do you mean "calls cabal"? Does it compile Setup.{l,}hs and call
the resulting binary, or does it use the Distribution.* modules to
parse the .cabal file?
If it's the latter then I see no reason to require a dependency to be
installed. At least not at that stage in the debianisation.
/M
--
Magnus Therning (OpenPGP: 0xAB4DFBA4)
magnus@therning.org Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
Reply to: