On Fri, 19 Jun 2009 18:45 +0100, "Ash Berlin" <[email protected]> wrote: > > On 19 Jun 2009, at 18:37, David Dooling wrote: > > > I am trying to clean up the prerequisites for a package that requires > > both DBI and DBD::SQLite (UR). CPAN wants to order the prerequisites > > in alphabetical order, so it tries to install DBD::SQLite first. It > > comes to this part of the DBD::SQLite Makefile.PL code > > > > # Because DBI generates a postamble at configure-time, we need > > # the required version of DBI very early. > > my $DBI_required = 1.57; > > eval { > > require DBI; > > }; > > if ( $@ or DBI->VERSION < $DBI_required ) { > > print "DBI 1.57 is required to configure this module, > > please install it or upgrade your CPAN/CPANPLUS shell\n"; > > exit(0); > > } > > > > and fails (although the exit status is zero) because an older version > > of DBI is installed. Even though DBI later appears and as PREREQ_PM > > in the WriteMakefile call, that line never gets executed, the Makefile > > never gets created, and CPAN will go no further with the DBD::SQLite > > install. CPAN does continue to try to install other modules, > > ultimately failing the requested install because DBD::SQLite is > > missing (or too old). > > > > I am not sure what the issue around the DBI postamble is so I am not > > sure how to fix this so DBD::SQLite to play nicely with CPAN. Any > > ideas/guidance on how to get this to behave as one might expect?
The DBI postamble copies two files from the DBI distribution into the DBD driver's distribution - they're the standard framework for any XS dbd driver. So the postamble is vital. I would assume that there was an incompatible change or a necessary bug fix in one or the other of these two files in the 1.56 -> 1.57 era that would make compilation impossible, although I could be wrong. (It's quite possible: http://search.cpan.org/diff?from=DBI-1.56&to=DBI-1.57#Driver.xst - The postamble itself hasn't changed since 1.56, so it's not that.) > Two possible solutions I can think of: > > 1) configure_requires. Doesn't help with old clients No, but it's the easiest way to help new ones. It can't hurt. > 2) Use the 'Are we running under a CPAN shell' from the (now improved) > Module::Install::AutoInstall. Do this, too. It will catch what the previous one does not. > Oh, a bonus 3rd option. > > 3) Remove the check and delay it to the first test which does BAIL_OUT > if DBI is too old. Does it even COMPILE if DBI is too old? --Curtis -- Curtis Jewell [email protected] %DCL-E-MEM-BAD, bad memory -VMS-F-PDGERS, pudding between the ears [I use PC-Alpine, which deliberately does not display colors and pictures in HTML mail] _______________________________________________ DBD-SQLite mailing list [email protected] http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbd-sqlite
