Bug 58536 - dependancy problem with perl *.ph files
dependancy problem with perl *.ph files
Status: CLOSED RAWHIDE
Product: Red Hat Linux
Classification: Retired
Component: rpm-build (Show other bugs)
7.2
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-01-18 18:33 EST by dharris
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-01-18 19:08:39 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
This is the patch that I am using to remove adding *.ph requirements. (389 bytes, patch)
2002-01-18 19:08 EST, dharris
no flags Details | Diff

  None (edit)
Description dharris 2002-01-18 18:33:59 EST
Description of Problem:

Perl uses .ph files as kind of "perl header" files, where standard C header 
files are translated into perl. This way, perl scripts that need to get at the 
value of a C preprocessor define can still do get this value by including the 
appropriate .ph file.

The RPM automatic provides and requires detection mechanism doesn't work right 
in regard to .ph files: it detects when a package requires a .ph file, but not 
when a package provides a .ph file.

Version-Release number of selected component (if applicable):

rpm-devel-4.0.3-1.03

SHELL SESSION TRANSCRIPT WITH COMMENTARY THAT SHOWS BUG
------------------------------------------------------------------

I have a SPEC file generated by /usr/lib/rpm/cpanflute to build a perl 
extension that I created. This extension uses the .ph file "syscall.ph". The 
SPEC file includes the following lines that help determine how requirements are 
generated:

Provide perl-specific find-{provides,requires}.
%define __find_provides /usr/lib/rpm/find-provides.perl
%define __find_requires /usr/lib/rpm/find-requires.perl

I build the extension and see that the requirements are:

# ./rpm -ba SPECS/*.spec
[[snip]]
# rpm -qp RPMS/i386/perl-drhperllib-1.15-7.i386.rpm --requires
perl >= 0:5.00503
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(VersionedDependencies) <= 3.0.3-1
perl(Authen::PAM)  
perl(Carp)  
perl(Cwd)  
perl(Exporter)  
perl(strict)  
perl(syscall.ph)  
perl(vars)  

Notice the "perl(syscall.ph)" requirement. This was generated 
by /usr/lib/rpm/find-requires.perl when it called /usr/lib/rpm/perl.req and the 
following line was found in my module:

require 'syscall.ph';

The problem is that the perl module does not provide "perl(syscall.ph)", even 
though it contains the syscall.ph file:

# rpm -q perl --provides | grep syscall
[[no output]]
# rpm -ql perl | grep syscall
/usr/lib/perl5/5.6.0/i386-linux/asm/syscall.ph
/usr/lib/perl5/5.6.0/i386-linux/linux/syscall.ph

Ack! This means that I can't install my RPM without a dependency failure. Lets 
try:

# rpm -ih RPMS/i386/perl-drhperllib-1.15-7.i386.rpm 
error: failed dependencies:
        perl(syscall.ph)   is needed by perl-drhperllib-1.15-7

Yup. Not fun!


RECOMENDED FIX
----------------------------------------------------------

I simply modified /usr/lib/rpm/perl.req so that it does not create requirements 
for .ph files. I'll include a patch for this.

The proper solution might be to modify the provides/requires mechanics so that 
the .ph files are added to the provides list and then provided by the perl 
package. However, this requires rebuilding the perl package, which I am not up 
to doing right now. This is something that RedHat could do on Red Hat Linux 
version upgrade.
Comment 1 dharris 2002-01-18 19:08:34 EST
Created attachment 42854 [details]
This is the patch that I am using to remove adding *.ph requirements.
Comment 2 Jeff Johnson 2002-01-22 19:02:56 EST
Integrated with your other patch, should be in rpm-4.0.4-0.17. Thanks again!

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