Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
metamod:handling_dependencies [2010-10-25 07:38:05] oysteint created |
metamod:handling_dependencies [2022-05-31 09:29:32] (current) |
||
---|---|---|---|
Line 21: | Line 21: | ||
Some of the problems we come across when using CPAN modules: | Some of the problems we come across when using CPAN modules: | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
===== Solution ===== | ===== Solution ===== | ||
+ | To reach our goals and solve the problems we will do the following: | ||
+ | - We create a script that based on list of modules will calculate the highest (we use the highest to ensure that a module is still available on CPAN) required version of all dependcies. This will be a tree of depencies. We can use CPAN:: | ||
+ | - The tree of dependecies will be then written to file in JSON format. | ||
+ | - We create another script that will download all the .tar.gz files for the calculated depencies of the correct version. These .tar.gz files are stored in a centralised source code repository and shared for the entire met.no. Only .tar.gz files for version we don't have will be downloaded. | ||
+ | - Based on the dependency tree create a Perl script that will install all the CPAN modules from the .tar.gz archives (cpanm can be used for this). The modules will then be installed to a specified directory to prevent conflicts with other installed versions. This script is largly meant for development machines and environments that are not Ubuntu/ | ||
+ | - Setup a build machine for each environment that is supported. | ||
+ | - Create .deb packages for each supported environment from the downloaded .tar.gz files. This can be done using cpan2dist.pl included as part of CPANPLUS. | ||
+ | |||
+ | ===== Alternative solution ===== | ||
+ | |||
+ | An alternative solution is to only use the Ubuntu package repositories and then persuade the Server section to make available Ubuntu server images for each Ubuntu release. We then restrict our selves to only the CPAN packages available in Ubuntu. If we need other package we make .deb packages for those packages and put them on the internal Ubuntu package repository. We also push them to Debian so that they will automatically included in the later distribution. This simplifies the dependency management somewhat, but does not make it easy to install METAMOD outside an Ubuntu/ | ||