Hide Forgot
Same problem is also in the internal (default) requires generator: # echo test.pl | /usr/lib/rpm/rpmdeps # When checking rpm sources... # grep -R "script)" * autodeps/linux.req:exelist=`echo $filelist | xargs -r file | egrep -v ":.* (commands|script) " | \ autodeps/linux.req: egrep ":.* (commands|script) " | cut -d: -f1` autodeps/freebsd.req:scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 ` autodeps/freebsdelf.req:scriptlist=`if test "x$filelist" != x; then echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1; fi` autodeps/darwin.req:scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 ` autodeps/openbsd.req:scriptlist=`echo $filelist | xargs file | egrep ":.* (commands|script) " | cut -d: -f1 ` build/parseScript.c: tfe->script = (script && *script != '\0') ? xstrdup(script) : NULL; build/pack.c: if (p->script) { build/pack.c: headerPutString(pkg->header, RPMTAG_TRIGGERSCRIPTS, p->script); build/spec.c: o->script = _free(o->script); lib/psm.c: if (script) { lib/psm.c: xx = Fwrite(script, sizeof(script[0]), strlen(script), fd); lib/psm.c: if (script) { lib/psm.c: if (rpmtdCount(&script) == 0 && rpmtdCount(&prog) == 0) lib/psm.c: rpmtdGetString(&script), psm->scriptArg, -1); lib/psm.c: rpmtdFreeData(&script); ltmain.sh: have already dealt with, above (inluding dump-script), then rpmio/rpmlua.c: if (luaL_loadbuffer(L, script, strlen(script), name) != 0) { rpmio/rpmlua.c: if (luaL_loadbuffer(L, script, strlen(script), name) != 0) { +++ This bug was initially created as a clone of Bug #1324003 +++ Description of problem: /usr/lib/rpm/redhat/find-requires contain at two places following grep pattern: ":.* (commands|script) " The problem is that file is identifying Perl scrips as follows: test.pl: Perl script, ASCII text executable Therefore /usr/lib/rpm/find-requires from rpm rather uses ":.* (commands|script)[, ]" Beside this problem there is also the same problem as described in bug 1275551. Version-Release number of selected component (if applicable): redhat-rpm-config-9.1.0-68.el7.noarch How reproducible: alwyas Steps to Reproduce: # cat > test.pl <<EOF #!/usr/bin/perl use AAA; use BBB; # use CCC is a comment and should not be part of requires sub get_help { return <<EOT; This text is a help an if it contains something like use DDD , it should not be part of requires or like use EEE , it should not be part of requires EOT } EOF # chmod a+x test.pl # echo test.pl | /usr/lib/rpm/redhat/find-requires objdump: test.pl: File format not recognized Expected results: /usr/bin/perl perl(AAA) perl(BBB) See also bug 1275551.
I guess there is no problem with missing requires in the end... I forgot to pass the parameter to rpmdeps. # echo $PWD/test.pl | /usr/lib/rpm/rpmdeps -R /usr/bin/perl perl(AAA) perl(BBB) perl(DDD) perl(EEE) So the only problem that remains are incorrect (additional) requires. Anyway, I am confused that it works, I can see in the source code that the regexp is not correct. Strange. Probably I am looking at the wrong piece of code.
(In reply to Karel Srot from comment #3) > Anyway, I am confused that it works, I can see in the source code that the > regexp is not correct. Strange. Probably I am looking at the wrong piece of > code. Of course I was looking at the wrong piece as the internal (C) generator is used by default. :-)
I have tested few more Perl samples from previously reported bugs and there is also an issue that more or less matches problems reported in bug 1268021: file enc2xs, there is a missing requires perl(File::Find) file ParseXS.pm, there is a missing requires perl(strict) To summarize it, so far the issues found are missing requires ^^ and additional (unwanted) requires perl(DDD) perl(EEE) from the bug 1275551.
One more finding. Perl sample from bug 1024517 file DependencyInfo.pm, there is an additional requires perl(warnings).
This has been filed against redhat-rpm-config by mistake, should be rpm.
It turned out this is a duplicate of bug 1275551. *** This bug has been marked as a duplicate of bug 1275551 ***