I've been using cpan2rpm a fair amount, and sometimes the rpm files
it produces refuse to install because of dependency issues. After
investigating, I think it's because of a problem with rpm's automatic
dependency generators for Perl.
The problem occurs when a Perl .pm file in a CPAN module has a 'use'
statement that corresponds to a .pm file also in the module, but that
second file's 'package' statement doesn't match the filename. This is
legal Perl. rpmbuild will generate a requires for the filename and a
provides for the package. Since these don't match, the RPM won't
install because it appears to require things that don't exist.
For example, take CPAN module VCS::LibCVS, whose RPM failed to
install with several requirements not met.
In one of its files, VCS/LibCVS/Client.pm, it has a use statement
use VCS::LibCVS::Client::Request::Requests;
which causes it to load VCS/LibCVS/Client/Request/Requests.pm, which
is also part of VCS::LibCVS. But Requests.pm has no package
statement for VCS::LibCVS::Client::Request::Requests. It defines
many other packages, but not that one. This is OK, because none of
the LibCVS code ever tries to create an object by that name. So the
code is fine.
But perl.req scans for 'use' statements, and generates a requirement
for perl(VCS::LibCVS::Client::Request::Requests), while perl.prov
scans for 'package' statements, so it never says that this module
provides a matching package. Result: when I try to install the
package, rpm says that it is missing
perl(VCS::LibCVS::Client::Request::Requests). This happens for
several other requirements as well.
I can get around this by adding Provides: tags for the "missing"
packages, but it seems to me that perl.prov ought not to scan for
package statements. It should just use the things that 'use'
statements actually care about - the filenames themselves.
Dan Franklin
dfranklin@xxxxxxx
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list