Re: ANN: cabal-debian et el
At Tue, 07 Apr 2009 14:09:14 +1000,
Trent W. Buck wrote:
> "Jeremy Shaw" <email@example.com> writes:
> It seems reasonable to me for cabal-debian to require that apt-file be
> installed and up-to-date, than to require all the build-dependencies to
> already be installed.
There are a few problems with using apt-file, but I think the solution
is to have it come second in the list of places to check.
The number one thing I use cabal-debian for is to debianize packages
from hackage for local use only. Meaning, I just build and install
them on my machine, I don't actually upload them anywhere. So, if I
want to install 'foo' which depends on 'bar' and neither are
debianized, I am going to have a problem, since bar is not going to be
uploaded, and hence, will not appear in the Contents file.
Even if I was going to upload the packages, it would be annoying if I
had to wait for bar to be uploaded and installed before I could run
cabal-debian on foo.
Or let's say I change libghc6-bar-doc to haskell-bar-doc and then
package foo. If 'bar' has not processed on the package server, then I
would get the old name for the bar doc package instead of the new one.
However, I think the solution to all these problems is to do:
1. first try to map the cabal package name to a binary deb name based
on locally installed packages.
2. if no match is found, try searching the Contents files.
3. if no match is found, use the debian haskell policy to guess the
correct name (and issue a warning).
However, there is another problem that has to be solved if the cabal
package is not actually installed locally. How do you know what file
to search for?
Let's say foo depends on bar > 3 && bar < 4. When bar is installed
locally, we can ask cabal where the files for the package that meets
those dependencies lives. But, if bar is not installed, then we need
some other way to derive that information.
I think the only tricky part is dealing with version ranges -- the
rest seems pretty easy to calculate based on available information.