Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Journal of chorny (7137)

Friday July 31, 2009
03:49 AM

RFC: auto install C (and other) deps on OS level

[ #39382 ]

I'd like to allow distributions to specify dependencies on OS packages (OS name, for ex, Debian => OS package, for every OS).
For ex., for XML::Parser:
'Fedora' => 'expat-devel',

Steps to implement this:
1. Research if deps names change in different OS versions.
2. Finish Linux::Distribution changes.
3. There are several CPAN modules to interface package managers: Linux::APT, RPM, RPM2, RPM4. Slackware::Slackget is a package manager. Try several of them and patch/rewrite if necessary.
4. Write a general module to interface them, with Linux dist detection by Linux::Distribution. It can be named Package::Installer.
5. As experiment, write Module::Install plugin that will ask to install OS package if Package::Installer is installed. Use `sudo` if user is not root.
6. Teach CPAN/CPANPLUS to do it. List of deps can be written in JSON file.

Advantages of this idea:
1. Easier installation of modules. And it would be more clear why install failed.
2. Better and more useful cpantesters results.

Future possibilities
3. More full implementation of automatic CPAN -> package converters (requires separation between work and build deps).
4. Teach CPAN/CPANPLUS to install modules from OS package repository.
5. Maybe it can also work on Win32, but it requires additional research.

P.S. It just came to my mind, that CPAN -> package dependencies can also be stored in some web DB edited by users.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • ad 1: Yes, they do. Once I setup a yaml file to keep the names of all
    non-perl dependencies for some application. It looked roughly like

        - pngcrush

        - jpegtran:
                    - libjpeg-progs
                    - libjpeg