﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
11246	git and shipped perl modules	ken@…	Bruce Dubbs	"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 [http://lists.linuxfromscratch.org/pipermail/blfs-book/2018-October/076582.html] I noted among other things:

With git-2.11.1 (and probably earlier), git installed both Error.pm and Git.pm (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 LoadCPAN.pm 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.

2. 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'.

"	enhancement	closed	normal	8.4	BOOK	SVN	medium	fixed		
