Bug 470811 - Spurious perl auto-requires
Spurious perl auto-requires
Product: Fedora
Classification: Fedora
Component: file (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Novotny
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-11-10 08:09 EST by Adam Tkac
Modified: 2013-04-30 19:41 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-12-04 04:01:59 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
test file (75.10 KB, text/plain)
2008-12-01 06:25 EST, Adam Tkac
no flags Details
patch for perl5 module recognition (468 bytes, patch)
2008-12-04 04:01 EST, Daniel Novotny
no flags Details | Diff

  None (edit)
Description Adam Tkac 2008-11-10 08:09:42 EST
Description of problem:
when I try build swig package for F11 output rpm is unusable due spurious perl dependencies:

$ rpm -i swig-1.3.36-1.fc11.x86_64.rpm 
error: Failed dependencies:
        perl(argv) is needed by swig-1.3.36-1.fc11.x86_64
        perl(example) is needed by swig-1.3.36-1.fc11.x86_64
        perl(it) is needed by swig-1.3.36-1.fc11.x86_64
        perl(the) is needed by swig-1.3.36-1.fc11.x86_64

Version-Release number of selected component (if applicable):
$ rpm -q rpm-build

How reproducible:

Steps to Reproduce:
1. download test srpm from http://atkac.fedorapeople.org/swig-1.3.36-1.fc11.src.rpm
2. build it
3. try install output rpm
Actual results:
installation fails due bad dependencies

Expected results:
no spurious perl deps

Additional info:
when I uncommented line 45 (rm -f Doc/Manual/Perl5.html) output rpm seems fine
Comment 1 Bug Zapper 2008-11-26 00:07:28 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
Comment 2 Panu Matilainen 2008-11-29 11:29:15 EST
This is the problem:
[pmatilai@turre Manual]$ file Perl5.html 
Perl5.html: Perl5 module source text

Current file/libmagic thinks it's perl so rpm runs perl dependency extractor on it. The fun of automatic file classification...
Comment 3 Adam Tkac 2008-12-01 06:22:40 EST
Reassigning to proper component
Comment 4 Adam Tkac 2008-12-01 06:25:15 EST
Created attachment 325218 [details]
test file

file says it is "Perl5 module source text" but it is not true.
Comment 5 Daniel Novotny 2008-12-01 10:35:58 EST
found the magic file entry which causes the problem.

# by Dmitry V. Levin and Alexey Tourbin
# check the first line
0	search/1	package
0	regex		\^package[\ \t]+[A-Za-z_]
>0	regex		\^package[\ \t]+[0-9A-Za-z_:]+\ *;	Perl5 module source text
# not 'p', check other lines
0	search/1	!p
>0	regex		\^package[\ \t]+[0-9A-Za-z_:]+\ *;
>>0	regex		\^1\ *;|\^(use|sub|my)\ .*[(;{=]	Perl5 module source text

consulted upstream.
Comment 6 Daniel Novotny 2008-12-04 04:01:03 EST
Created attachment 325653 [details]
patch for perl5 module recognition

one line in the magic entry was wrong
Comment 7 Daniel Novotny 2008-12-04 04:01:59 EST
fixed in file-4.26-5.fc11

Note You need to log in before you can comment on or make changes to this bug.