Re: Small package or big dependencies?
+++ Joachim Breitner [Aug 02 10 11:20 ]:
> Am Montag, den 02.08.2010, 10:37 +0200 schrieb Giovanni Mascellani:
> > Il 02/08/2010 10:28, Joachim Breitner ha scritto:
> > >> I think that the cleaner and preferable option is the first (use a
> > >> standalone package), but I'd like to hear your opinion about that.
> > >
> > > Letting gitit depend on libghc6-filestore-dev is no option. People don’t
> > > want to install the haskell toolchain just to use a wiki.
> > >
> > > What does the file contain?
> > >
> > > Is it likely that an updated filestore will change the format of the
> > > file? In that case, copying it while gitit is built sounds like the most
> > > sensible solution. This corresponds to static linking: The code gets
> > > copied, so the data has to be copied as well.
> > >
> > > If we had dynamic linking, this would be different of course.
> > The file is a small script intended to be used as a hook in a Git
> > repository; its purpose is to automatically update the working copy of a
> > non-bare Git repository when something gets pushed into the currently
> > checked out branch.
> > It's unlikely to be changes in the future, and anyway it's not strictly
> > tied with a specific version of filestore.
> Hm, I still think it ought to be copied to gitit. It is just not worth a
> package of its own.
> Is it installed automatically by gitit or just for user reference? In
> the latter case, it could be moved
> to /usr/share/doc/git/contrib/examples in the git package.
I'm the upstream maintainer for both gitit and filestore.
The file is a git hook. It causes the git working directory to be updated
when someone pushes to the repository. This is required for git filestores
to work correctly, so the gitInit function in Data.FileStore.Git installs
it when a new git filestore is created.
It is installed by filestore as a Cabal data file and accessed using
getDataFileName from Paths_filestore.
Now, I guess the problem is this: gitit statically links with filestore,
so you don't need the filestore package installed for gitit to run, but
the post-update file *does* need to be where filestore expects it to be,
and it won't be unless filestore has been installed.
The solution being discussed, I take it, is to have the gitit debian package
(not the cabal package) install the post-update file to the location filestore
expects it in. However, there are a couple of problems with this:
- the gitit and filestore packages will both be supplying this file --
I don't know enough about debian to know if this will cause problems,
but wouldn't you get a warning that the package you're installing
is overwriting an existing file?
- it's going to be a maintenance headache, since the maintainer of
the gitit package will have to make sure that the post-update file
is updated in gitit whenever it is changed in filestore.
In addition, I think there's good reason not to address this problem
in a way that is specific to gitit. After all, the same problem will
affect any package that (a) supplies an executable that should be installable
without Haskell libraries, and (b) depends on libraries that rely on data
files. I'm sure there are other examples than gitit. If there aren't now,
there will be soon. So it might be worth putting some thought into how to
One possible solution, which would require modifying haskell-devscripts,
would be this. If a library (say, filestore) has data files
that it accesses via Paths_filestore, then there could be an additional debian
package for it that just installs the data files, so we'd have:
libghc6-filestore-dev and gitit could both depend on libghc6-filestore-data,
which would have no further dependencies of its own.
It seems to me that this would be a clean solution to the problem.