[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ANN: cabal-debian et el



At Mon, 06 Apr 2009 07:18:45 +0100,
Magnus Therning wrote:

> 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?

One possible answer is, how do know what the name of the debian binary
is that provides the library if you don't have the package installed?
With the debian binary installed you can do:

 1. find cabal package name
 2. find files associated with the package
 3. map those files back to the deb(s) that provide(s) them

The other option is to just assume that package 'foo' is provided by
libghc6-foo-dev. (Which is how the code actually works right now).

This is this code that that generates the error message:

simplePackageDescription :: GenericPackageDescription -> Flags
                         -> IO (Compiler, PackageDescription)
simplePackageDescription genPkgDesc flags = do
    (compiler, _) <- configCompiler (Just (rpmCompiler flags)) Nothing Nothing
                     defaultProgramConfiguration
                     (rpmVerbosity flags)
    installed <- installedPackages
    case finalizePackageDescription (rpmConfigurationsFlags flags)
         (Just installed) buildOS buildArch (compilerId compiler) [] genPkgDesc of
      Left e -> die $ "finalize failed: " ++ show e
      Right (pd, _) -> return (compiler, pd)

I could change, (Just installed), to Nothing, though I have no idea
what the side effects of that will be. According to the docs,

 "It takes as inputs a not necessarily complete specifications of
 flags assignments, an optional package index as well as platform
 parameters. If some flags are not assigned explicitly, this function
 will try to pick an assignment that causes this function to
 succeed. The package index is optional since on some platforms we
 cannot determine which packages have been installed before. When no
 package index is supplied, every dependency is assumed to be
 satisfiable, therefore all not explicitly assigned flags will get
 their default values."

- jeremy shaw.


Reply to: