Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent crash if CPAN distribution has blank author field #1937

Merged
merged 1 commit into from
Oct 16, 2022

Conversation

NicholasBHubbard
Copy link
Contributor

@NicholasBHubbard NicholasBHubbard commented Oct 13, 2022

This PR fixes issue #1523.

Because Class::Data::Inheritable version 0.08 has a blank author field in its META.yml file, the bug can be reproduced with the following command:

fpm --no-cpan-test --cpan-verbose --verbose --debug-workspace --workdir $HOME/fpm_tmp/ -s cpan -t rpm -v 0.08 Class::Data::Inheritable

@wbraswell
Copy link
Contributor

As the original bug identifier and fix author, I approve of this PR.
This PR replaces one part of my original now-closed PR:
#1528
@jordansissel: Please accept this PR, thanks! :-)

@NicholasBHubbard NicholasBHubbard marked this pull request as ready for review October 13, 2022 21:20
@jordansissel
Copy link
Owner

Looks good!

I tested as recommended in the description:

% bundle exec bin/fpm --no-cpan-test --cpan-verbose --verbose --debug-workspace -s cpan -t rpm -v 0.08 Class::Data::Inheritable
...
% rpm -qp perl-Class-Data-Inheritable-0.08-1.noarch.rpm --qf "%{Vendor}\n"
No Vendor Or Author Provided

I confirmed on the main branch that the same fpm command line fails:

Invalid package configuration: Unexpected CPAN 'author' field type: NilClass. This is a bug. {:level=>:error}

@jordansissel jordansissel merged commit 409a3b2 into jordansissel:main Oct 16, 2022
@NicholasBHubbard NicholasBHubbard deleted the fix-cpan-no-author branch October 18, 2022 21:29
@jordansissel
Copy link
Owner

fpm 1.15.0 is released and contains this improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants