#895874 git-email: Should depend on libmailtools-perl for Mail::Address

#895874#5
Date:
2018-04-17 04:29:56 UTC
From:
To:
Dear Maintainer,

According to the Debian changelog entry for 1:2.17.0-1

  * debian/rules: add NO_USE_CPAN_FALLBACKS=1 to OPTS to avoid
    installing bundled copies of perl modules.
  * debian/control: Build-Depends: libmailtools-perl, liberror-perl;
    git-email: Depends: libmailtools-perl for Mail::Address.

git-email no longer bundles Mail::Address but depends on
libmailtools-perl for it instead. Indeed it is no longer included,
but the control file still lists libmailtools-perl in the Recommends:
entry, not the Depends: entry. This results in the following error
message on systems that don't install recommended packages by default:

    BUG: The 'Mail::Address' 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). at
    /usr/share/perl5/Git/LoadCPAN.pm line 76.
    BEGIN failed--compilation aborted at
    /usr/share/perl5/Git/LoadCPAN/Mail/Address.pm line 8.
    Compilation failed in require at /usr/lib/git-core/git-send-email line
    36.
    BEGIN failed--compilation aborted at /usr/lib/git-core/git-send-email
    line 36.

It seems the change for the second bullet point was missed or not
checked in. git-email in unstable still only recommends
libmailtools-perl [1].

I suggest double checking the control file for the package, and
uploading a revision fixing it.

[1] https://packages.debian.org/sid/git-email

P.S. The system information below shows that I have libmailtools-perl
installed. I installed it manually.

#895874#10
Date:
2019-08-01 03:00:42 UTC
From:
To:
Hi,

I'm using a docker image "FROM debian:10", and to get git-send-email working
properly, I had to install libmailtools-perl by hand. It would be great if
it was added as a dependency for the package.

Thanks

#895874#15
Date:
2020-01-16 22:41:49 UTC
From:
To:
The git-send-email.perl file does have use
Git::LoadCPAN::Mail::Address and since you do NO_PERL_CPAN_FALLBACKS
trying to use it throws the following error explaining that the system
is broken:

#895874#20
Date:
2021-11-30 21:05:55 UTC
From:
To:
I can confirm the same bug and the same solution (libmailtools-perl)
present in debian 11 bullseye...

#895874#25
Date:
2024-01-19 08:12:38 UTC
From:
To:
The bug is still present in modern versions of git-email.
I. e. after 6 years it is still not fixed.

I did some experiments and I figured that the following 3
packages should be added to "Depends":

libmailtools-perl libauthen-sasl-perl ca-certificates

They are required for sending mail