[rhelv6-list] Perl-5.6.12 RPM Dependency

Red Hat Enterprise Linux 6 (Santiago) discussion mailing-list rhelv6-list at redhat.com
Mon Jan 28 23:42:03 UTC 2013


> I have built an RPM of perl-5.6.12 from source.
>
> When I try to install this RPM it throws following dependency issues,
>
> # rpm -ivh /home/nirmal/rpmbuild/RPMS/x86_64/perl-5.16.2-1.el6.x86_64.rpm
> error: Failed dependencies:
>    perl(FCGI) is needed by perl-5.16.2-1.el6.x86_64
>    perl(Mac::BuildTools) is needed by perl-5.16.2-1.el6.x86_64
>    perl(Mac::InternetConfig) is needed by perl-5.16.2-1.el6.x86_64
>    perl(Your::Module::Here) is needed by perl-5.16.2-1.el6.x86_64
>    perl(unicore::Name) is needed by perl-5.16.2-1.el6.x86_64
>
> I can not find RPMs of these Perl modules anywhere.

This happens because the automatic dependency checker for perl modules
detects that one or more modules either "require" or "use" these modules.
The issue is that the dependency checker doesn't realize that they're
optional.  perl is a complicated language to parse ("only perl can parse
perl"), so it would be a lot more work to make the dependency checker
realize this.

When I've run into this issue, I find the modules that are causing
the spurious requires and patch them to not have the require/use
statements.

For example, my spec for perl 5.16.1 has this in the %pre section, after
the %setup:

#
# white-out some dependencies we don't want to acquire.
#
cd cpan/CPAN/lib
chmod u+w CPAN.pm
cp CPAN.pm CPAN.pm.orig
sed -e 's/^require Mac::BuildTools /#require Mac::BuildTools /' \
     < CPAN.pm.orig > CPAN.pm
rm -f CPAN.pm.orig
cd ../../..
cd cpan/libnet/Net
chmod u+w Config.pm
cp Config.pm Config.pm.orig
sed -e 's/^use Mac::InternetConfig/#use Mac::InternetConfig/' \
     < Config.pm.orig > Config.pm
rm -f Config.pm.orig
cd ../../..
cd cpan/CPANPLUS/lib/CPANPLUS/Internals/Constants
chmod u+w Report.pm
cp Report.pm Report.pm.orig
sed -e 's/^use Your::Module::Here/#use Your::Module::Here/' \
     < Report.pm.orig > Report.pm
rm -f Report.pm.orig
cd ../../../../../..

Tim
-- 
Tim Mooney                                             Tim.Mooney at ndsu.edu
Enterprise Computing & Infrastructure                  701-231-1076 (Voice)
Room 242-J6, IACC Building                             701-231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164




More information about the rhelv6-list mailing list