Opened 5 years ago

Closed 5 years ago

#11246 closed enhancement (fixed)

git and shipped perl modules

Reported by: ken@… Owned by: Bruce Dubbs
Priority: normal Milestone: 8.4
Component: BOOK Version: SVN
Severity: normal Keywords:


Douglas noted when updating to git-2.19.0 that it installs perl modules in /usr/share/perl5/Git and queried this.

In my reply at I noted among other things:

With git-2.11.1 (and probably earlier), git installed both and (with its submodules under Git/) in site_perl.

Pierre noticed Error,pm and made that a recommended dependancy. From then until git-2.16 git installed only Git in site_perl.

From git-2.17.0 onwards Git, Error and Mail/Address have been installed in /usr/share/perl5.

Testing shows that they are not available to other perl packages/users, but they are available to git itself (e.g. Mail::Address is used by git send-email).

The Release Notes for 2.17.0 mention

* As a convenience, we install copies of Perl modules we require which
   are not part of the core Perl distribution (e.g. Error and
   Mail::Address).  Users and packagers whose operating system provides
   these modules can set NO_PERL_CPAN_FALLBACKS to avoid installing the
   bundled modules.

Using NO_PERL_CPAN_FALLBACKS (I'm not exactly sure of the best way to set that), if the required modules are not found in a distro but the in /usr/share/perl5 is present, attempting to run a git command which needs one will report:

{{ BUG: The '%s' module is not here, but NO_PERL_CPAN_FALLBACKS was set!

Git needs this Perl module from the CPAN, and will by default ship with a copy of it. This Git was built with NO_PERL_CPAN_FALLBACKS, meaning that whoever built it promised to provide this module.

You're seeing this error because they broke that promise, and we can't load our fallback version, since we were asked not to install it.

If you're seeing this error and didn't package Git yourself the package you're using is broken, or your system is broken. This error won't appear if Git is built without NO_PERL_CPAN_FALLBACKS (instead we'll use our fallback version of the module). }}}

I also note that Fedora does not let anything get installed by git in /usr/share/perl5.

It seems to me that we have two options:

  1. Build with that option, force users to separately install Mail::Address and Git ans well as Error. AFAICS the Git module is a copy from git's own development tree.
  1. Accept that we have more in common with the "build git yourself" approach than the "we are a distro and provide everything" approach. As a consequence, since git is the only package in the book which uses the Error module, we can remove that and mention the modules git installs for its own use.

Given that we lack people to keep everything up to date, my personal preference is choice '2'.

Change History (2)

comment:1 by Bruce Dubbs, 5 years ago

Owner: changed from blfs-book to Bruce Dubbs
Status: newassigned

comment:2 by Bruce Dubbs, 5 years ago

Resolution: fixed
Status: assignedclosed

I archived perl-error in revision 20765. Marking fixed.

Note: See TracTickets for help on using tickets.