Hi, As we see in https://bugzilla.redhat.com/show_bug.cgi?id=58537 and https://bugzilla.redhat.com/show_bug.cgi?id=1547805 https://bugzilla.redhat.com/show_bug.cgi?id=1539344 again in dpkg-source.pl of package dpkg (bug #1539344), the text [1] on "sub usage" generate a bad requirement, this time the requirement is perl(at) [2] [1] g_( 'General options: --threads-max=<threads> use at most <threads> with compressor. -q quiet mode. [2] /usr/lib/rpm/perl.req dpkg-1.21.20/scripts/dpkg-source.pl perl(Cwd) perl(Dpkg) perl(Dpkg::Arch) perl(Dpkg::Changelog::Parse) perl(Dpkg::Compression) perl(Dpkg::Conf) perl(Dpkg::Control::Fields) perl(Dpkg::Control::Info) perl(Dpkg::Control::Tests) perl(Dpkg::Deps) perl(Dpkg::ErrorHandling) perl(Dpkg::Gettext) perl(Dpkg::Source::Format) perl(Dpkg::Source::Package) perl(Dpkg::Substvars) perl(Dpkg::Vars) perl(Dpkg::Vendor) perl(Dpkg::Version) perl(File::Basename) perl(File::Spec) perl(List::Util) perl(at) perl(strict) perl(warnings)
perl-req is able to skip * the here-docs "<<" blocks * q{} quoted sections * documentation * assign statements with multiline string * multiline print For multiline print, it expects `print` and `"` or `'`. It is not so easy cover each user defined function e.g. `g_`. perl-generators tries to filter as many lines as possible, but it can't filter everything what we need.
I tried yesterday without success fixed the regexp , adding more one simple rule, lines or comnand must be ended with semi-colon (;) , if you can add this rule it will fix my case !
to checkout you may run : fedpkg clone dpkg cd dpkg git reset HEAD~1 --hard # to remove my hack fedpkg prep /usr/lib/rpm/perl.req dpkg-1.21.20/scripts/dpkg-source.pl
(In reply to Sergio Basto from comment #2) > I tried yesterday without success fixed the regexp , adding more one simple > rule, lines or comnand must be ended with semi-colon (;) , > if you can add this rule it will fix my case ! It is not so easy to solve it by adding semi-colon, because in this case, it will be ignore command like this: use overload '+' => \&myadd, '-' => \&mysub; use base qw/ Try /; and it brings more issues. Please add filter for bogus require perl(at) to your spec.
Created attachment 1945489 [details] Fix requires from perl-generators
@sergio I added patch for proper fix. If I am looking to previous patch: > sed -e '/perl(Dselect::Ftp)/d' -e '/perl(extra)/d' -e '/perl(file)/d' -e '/perl(in)/d' Dselect::Ftp is provided by dselect package and used in it only. It's ok. I don't found perl(in). And other are related to bad generation by perl-generators, so we need to remove it.
hi, I just notice today with your comment that sed command was already to fix for bad generation by perl-generators (In reply to Jitka Plesnikova from comment #4) > (In reply to Sergio Basto from comment #2) > > I tried yesterday without success fixed the regexp , adding more one simple > > rule, lines or comnand must be ended with semi-colon (;) , > > if you can add this rule it will fix my case ! > > It is not so easy to solve it by adding semi-colon, because in this case, it > will be ignore command like this: > > use overload > '+' => \&myadd, > '-' => \&mysub; > > use base qw/ > Try > /; > > and it brings more issues. These examples just confirm my suggest rule is correct, all the cases end with a semicolon. In my point of view, the problem of the regexp is to trying do all in one step, if we have two or more steps, should be easier to work the regexps, in this case, if you extract the lines first and after in a second step check if end with semicolon ... > Please add filter for bogus require perl(at) to your spec. done ( https://src.fedoraproject.org/rpms/dpkg/c/09d84c98b04c58751f4d03fa4cc141a9f987958b?branch=rawhide )
(In reply to Sergio Basto from comment #7) > hi, > I just notice today with your comment that sed command was already to fix > for bad generation by perl-generators > > (In reply to Jitka Plesnikova from comment #4) > > (In reply to Sergio Basto from comment #2) > > > I tried yesterday without success fixed the regexp , adding more one simple > > > rule, lines or comnand must be ended with semi-colon (;) , > > > if you can add this rule it will fix my case ! > > > > It is not so easy to solve it by adding semi-colon, because in this case, it > > will be ignore command like this: > > > > use overload > > '+' => \&myadd, > > '-' => \&mysub; > > > > use base qw/ > > Try > > /; > > > > and it brings more issues. > > These examples just confirm my suggest rule is correct, all the cases end > with a semicolon. You're right. However, perl.req is simple script that processes files line by line, so it doesn't find the semicolon in one step. It isn't easy to fix it now. I add the bug to tracking bug for Perl provides/requires.