Description of problem: The package should include the 'perl-base' package as a required dependency, not a weak one. If weak dependencies are not enabled, then a perl error message will appear when trying to launch the program in a terminal. Version-Release number of selected component (if applicable): kpcli.noarch 3.6-5.fc35 How reproducible: Every time Steps to Reproduce: 1. Install the package, "# dnf install kpcli --setopt=install_weak_deps=False" 2. Launch kpcli in a terminal emulator Actual results: "Can't locate base.pm in @INC (you may need to install the base module) (@INC contains: /usr/local/lib64/perl5/5.34 /usr/local/share/perl5/5.34 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at /usr/share/perl5/Module/Loaded.pm line 6. BEGIN failed--compilation aborted at /usr/share/perl5/Module/Loaded.pm line 6. Compilation failed in require at /usr/bin/kpcli line 45. BEGIN failed--compilation aborted at /usr/bin/kpcli line 45." Expected results: The application does not show any errors Additional info: The 'perl-base' package needs to be a required dependency
Reassigned to perl: "BEGIN failed--compilation aborted at /usr/share/perl5/Module/Loaded.pm line 6." "package Module::Loaded; use strict; use Carp qw[carp]; BEGIN { use base 'Exporter';" >rpm -qf --qf='%{sourcerpm}\n' /usr/share/perl5/Module/Loaded.pm perl-5.34.1-486.fc35.src.rpm >rpm -q --requires perl | grep base [no output]
More importantly, perl's subpackage perl-Module-Loaded is missing the "Requires: perl(base)": >rpm -q --requires perl-Module-Loaded | grep base [no output]
This is actually a bug in the perl-generators perl.req script: >/usr/lib/rpm/perl.req ~/src/fedora/git/perl/perl-5.36.0/cpan/Module-Loaded/lib/Module/Loaded.pm perl(Carp) perl(strict) perl(vars) If you add a newline before the 'use base' line in Loaded.pm, it works correctly: >diff -ub Loaded.pm~ Loaded.pm --- Loaded.pm~ 2022-07-24 11:46:54.711678673 -0400 +++ Loaded.pm 2022-07-24 11:59:00.149220316 -0400 @@ -3,7 +3,8 @@ use strict; use Carp qw[carp]; -BEGIN { use base 'Exporter'; +BEGIN { + use base 'Exporter'; use vars qw[@EXPORT $VERSION]; $VERSION = '0.08'; >/usr/lib/rpm/perl.req Loaded.pm perl(Carp) perl(Exporter) perl(base) perl(strict) perl(vars)
Created attachment 1899053 [details] proposed fix including test cases
Thanks for the report, I'll look at it.