Perl module packaging for Starlink is currently a bit of a disaster.
Shipwright was a good idea but it's not really fit for purpose. Even
when it works you wonder when it's going to break and every time you
leave it alone for a month you forget how to tweak it or update the
distributions. It also has a history of being flaky.
The plus points are:
- you are able to patch the tests to get known failures skipped in
the local master branch
- once checked out you don't need a network connection to install everything.
I've been revisiting this as I work towards kapuahi and it seems that
a much much easier approach would be to adopt a simple cpanminus
approach to installation.
- add a perlmods directory to thirdparty/perlsys/ (this could be a
submodule itself if we need to run the installs independently)
- Put all the CPAN modules we need into a text file
Then we write a simple script that
- installs cpanminus (we could include the cpanminus tar ball or get
it to download from the internet)
- foreach line in cpan text file
run cpanminus
Then for each Starlink/JAC perl module (that is not on cpan) we attach
the git repository as a submodule
- foreach module directory
run cpanminus in that directory
and that should be it. The wrinkles being that
1. All the JAC modules used by Starlink would have to be public git
repositories (the JSA module might have to be split in two to remove
the Sybase dependency that we ignore for Starlink but which messes up
the tests) or else we also make use of the cpanminus facility to run
on a distribution tar file.
2. We need a network connection when doing the perl install. We could
get around this by downloading the explicit distribution tar balls and
storing them in the repository. cpanminus has no problem running on
those directly. I'm not sure it's something we really need to worry
about. (cpanminus can save the distributions to a directory as it
installs them so it's not hard to do this).
3. There might be failing tests. I just installed all the modules on
my Mac and as things stand there don't seem to be failing tests for me
with perl 5.16. This may not be true everywhere of course. There is an
option to force an install and even to disable the tests but we'd
presumably want to do that only for systems where we know the test
fails and where we know we don't care.
On the whole this seems to be a whole lot less opaque than shipwright
and could easily be handled during a make world.
Does anyone have an opinion?
--
Tim Jenness
|