On 31/07/13 09:22, Frank Ch. Eigler wrote:
Ken McDonell <kenj@xxxxxxxxxxxxxxxx> writes:
Considering that it is a genuine dependency, and assists
administrators on sufficiently CPAN-friendly distributions, we
shouldn't just disable this everywhere. Perhaps it could be
an RPM-level conditional, which either preserves the normal
perl prereq-detection, or suppresses it (but calls CPAN to
install dependencies in the %pre-install scriptlet).
I have a workaround for the rpm auto-generated Requires dependency ...
see my last take.
This allows us to build and ship and install the
pcp-import-sheet2pcp rpms without the rpm-generated dependency on the
perl-Spreadsheet-Read rpm.
I'd vote against calling CPAN inside a %pre-install scriplet because CPAN
- may require interactive responses from the user
- needs a public internet connection
- downloads potentially a lot of stuff from cpan
Rather, I think we should do our own pre-requisite checking in these
cases, so replace
use Spreadsheet::Read;
with
eval
{
require Spreadsheet::Read;
Spreadsheet::Read->import();
};
if ($@) {
die "Error: Perl Module Spreadsheet::Read needs to be installed
either from\nyour distro or downloaded and installed from CPAN\n";
}
|