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

Re: ANN: cabal-debian et el

On Mon, Apr 6, 2009 at 4:45 PM, Jeremy Shaw <jeremy@n-heptane.com> wrote:
> 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).

That would be a good way to do it, I think.  Then we'll have to deal
with some packages that don't follow the convention (quickcheck might
be one I've understood, and some base packages provided in the ghc6
package are currently not exported as virtual packages by that

> 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."

That text is dense to get through.  As I read it it means that all
packages are installed if you pass in Nothing.


Magnus Therning                        (OpenPGP: 0xAB4DFBA4)
magnus@therning.org          Jabber: magnus@therning.org
http://therning.org/magnus         identi.ca|twitter: magthe

Reply to: