Bug 470811 - Spurious perl auto-requires
Summary: Spurious perl auto-requires
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: file
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Novotny
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-10 13:09 UTC by Adam Tkac
Modified: 2013-04-30 23:41 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-12-04 09:01:59 UTC
Type: ---
Embargoed:


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

Description Adam Tkac 2008-11-10 13:09:42 UTC
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
rpm-build-4.6.0-0.rc1.7.x86_64

How reproducible:
always

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 05:07:28 UTC
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:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Panu Matilainen 2008-11-29 16:29:15 UTC
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 11:22:40 UTC
Reassigning to proper component

Comment 4 Adam Tkac 2008-12-01 11:25:15 UTC
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 15:35:58 UTC
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 09:01:03 UTC
Created attachment 325653 [details]
patch for perl5 module recognition

one line in the magic entry was wrong

Comment 7 Daniel Novotny 2008-12-04 09:01:59 UTC
fixed in file-4.26-5.fc11


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