Skip Menu |

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 50089
Status: open
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: stro [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.25
Fixed in: (no value)

Attachments


Subject: CPAN shell-friendly
Hi guys. Current implementation of Makefile.PL is not CPAN shell-friendly. When I'm using a brand new Perl, I'm running "cpan CPAN::SQLite" to get rid of slow and memory-eager Metadata, but it doesn't work: CPAN::SQLite requires DBD::SQLite and CPAN shell processes this correctly, but DBD::SQLite, which requires DBI, just exits with message: "DBI 1.57 is required to configure this module, please install it or upgrade your CPAN/CPANPLUS shell". Well, I already have the most recent CPAN shell. But it cannot do anything if Makefile.PL exits with errorcode=0 prior to WriteMakefile() call, because it means something like "external non-Perl dependency is missing, or something else that CPAN.pm cannot resolve". It's not the case with DBI, because CPAN actually can install DBI. Could you remove this check? It *may* be inconvenient for somebody who prefer "perl Makefile.PL" and turn a blind eye on warnings. But it's much more convenient for those who run cpan/cpanp. -- Serguei Trouchelle
Hi. If your CPAN/CPANPLUS shell is new enough, that means, if it actually supports "configure_requires" (roughly CPAN >= 1.92 and CPANPLUS >= 0.88), then it parses META.yml first to see configure_requires, and installs the said requirements, before executing Makefile.PL. So there should be no problem when we exit if we don't have DBI >= 1.57 (if this should fail, there must have been some errors while installing/upgrading DBI). If your CPAN/CPANPLUS shell is not new enough (this is usually the case when you just start using brand new perl, as the core (bundled) version is much older), the shell doesn't check "configure_requires" and tries to execute Makefile.PL first. But, in this case, we don't have required DBI installed yet when we write a Makefile, so we need to exit, as CPAN/ CPANPLUS can't help this case. I confirmed the latest CPAN worked fine when I intentionally tried to install latest DBD::SQLite with older DBI. So I reject this ticket as works_for_me. In short, you need to upgrade your CPAN/Bundle::CPAN first, before you try to install CPAN::SQLite. Thanks, Kenichi On Tue Sep 29 06:56:36 2009, STRO wrote: Show quoted text
> Hi guys. > > Current implementation of Makefile.PL is not CPAN shell-friendly. When > I'm using a brand new Perl, I'm running "cpan CPAN::SQLite" to get rid > of slow and memory-eager Metadata, but it doesn't work: CPAN::SQLite > requires DBD::SQLite and CPAN shell processes this correctly, but > DBD::SQLite, which requires DBI, just exits with message: > > "DBI 1.57 is required to configure this module, please install it or > upgrade your CPAN/CPANPLUS shell". > > Well, I already have the most recent CPAN shell. But it cannot do > anything if Makefile.PL exits with errorcode=0 prior to WriteMakefile
() Show quoted text
> call, because it means something like "external non-Perl dependency is > missing, or something else that CPAN.pm cannot resolve". It's not the > case with DBI, because CPAN actually can install DBI. > > Could you remove this check? It *may* be inconvenient for somebody who > prefer "perl Makefile.PL" and turn a blind eye on warnings. But it's > much more convenient for those who run cpan/cpanp.
Subject: Re: [rt.cpan.org #50089] CPAN shell-friendly
Date: Tue, 29 Sep 2009 17:43:39 +0300
To: bug-DBD-SQLite [...] rt.cpan.org
From: Serguei Trouchelle <stro [...] cpan.org>
Kenichi Ishigaki via RT wrote: Show quoted text
> Hi. If your CPAN/CPANPLUS shell is new enough, that means, if it > actually supports "configure_requires" (roughly CPAN >= 1.92 and > CPANPLUS >= 0.88), then it parses META.yml first to see > configure_requires, and installs the said requirements, before > executing Makefile.PL.
You are wrong. CPAN.pm doesn't install anything before running Makefile.PL. "configure_requires", "build_requires" and "requires" are processed at the same time -- at least in latest version of CPAN.pm Show quoted text
> So there should be no problem when we exit if we > don't have DBI >= 1.57 (if this should fail, there must have been some > errors while installing/upgrading DBI). > > If your CPAN/CPANPLUS shell is not new enough (this is usually the case > when you just start using brand new perl, as the core (bundled) version > is much older)
Perl 5.10.1 has CPAN.pm 1.9402, which is the latest non-dev version of CPAN. , the shell doesn't check "configure_requires" and tries Show quoted text
> to execute Makefile.PL first. But, in this case, we don't have required > DBI installed yet when we write a Makefile, so we need to exit, as CPAN/ > CPANPLUS can't help this case.
Why can't? CPAN parses Makefile.PL output, detects any missing prerequisites, installs them and then runs Makefile.PL once again. That's how thousands of distributions work. Show quoted text
> I confirmed the latest CPAN worked fine when I intentionally tried to > install latest DBD::SQLite with older DBI. So I reject this ticket as > works_for_me.
Try it w/o DBI. If it still would work for you, I'll be VERY surprised. Show quoted text
> In short, you need to upgrade your CPAN/Bundle::CPAN first, before you > try to install CPAN::SQLite.
Well, there's nowhere to upgrade on 5.10.1 (except to dev. 1.94_51 which is pretty the same when it comes to "configure_requires"). -- Serguei Trouchelle
Oops. I apologize I was too rash for this ticket. I must have misunderstood in many ways.
Subject: Re: [rt.cpan.org #50089] CPAN shell-friendly
Date: Wed, 30 Sep 2009 12:06:19 +1000
To: bug-DBD-SQLite [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #50089] CPAN shell-friendly
Date: Wed, 30 Sep 2009 13:46:14 +0300
To: bug-DBD-SQLite [...] rt.cpan.org
From: Serguei Trouchelle <stro [...] cpan.org>
Reserved Local Account via RT wrote: Show quoted text
> 2009/9/30 stro@cpan.org via RT <bug-DBD-SQLite@rt.cpan.org>:
>> You are wrong. CPAN.pm doesn't install anything before running Makefile.PL. >> "configure_requires", "build_requires" and "requires" are processed at the same time -- at least in latest version of >> CPAN.pm
> > You are wrong. Note the following... > > ---- Unsatisfied dependencies detected during ---- > ---- ADAMK/DBD-SQLite-1.25.tar.gz ---- > DBI [build_requires] > > That is CPAN _not_ running the Makefile.PL
I've spent some time digging why this happens and it seems that clear new installation of Perl doesn't have YAML.pm installed and thus CPAN.pm doesn't check dependencies from META.yml and relies on old Makefile.PL parsing (and obviously fails with DBD-SQLite). Full log of installation is attached if somebody is interested. Because I tend to install CPAN-SQLite first on new Perl installations, no wander that it fails for me many times. While somebody may say that clean CPAN.pm (w/o YAML) installation is borked, other modules with prerequisites install just fine, so I think it would be good to remove exit(0) from DBD-SQLite so YAML-less CPAN.pm can process it without problems. Especially when the fix is so easy. Or there's some point in having exit(0) in Makefile.PL? -- Serguei Trouchelle

Message body not shown because it is not plain text.

58c58 < exit(0); --- > # exit(0); 272,273d271 < require DBI; < require DBI::DBD; 274a273,274 > require DBI; > require DBI::DBD;
Subject: Re: [rt.cpan.org #50089] CPAN shell-friendly
Date: Wed, 30 Sep 2009 21:48:22 +1000
To: bug-DBD-SQLite [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
Hrm, CPAN is SUPPOSED to use Parse::CPAN::Meta (which comes in the core in 5.10.1) to parse the META.yml file. It shouldn't be using YAML.pm... Adam K 2009/9/30 stro@cpan.org via RT <bug-DBD-SQLite@rt.cpan.org>: Show quoted text
>       Queue: DBD-SQLite >  Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=50089 > > > Reserved Local Account via RT wrote: >
>> 2009/9/30 stro@cpan.org via RT <bug-DBD-SQLite@rt.cpan.org>:
>>> You are wrong. CPAN.pm doesn't install anything before running Makefile.PL. >>> "configure_requires", "build_requires" and "requires" are processed at the same time -- at least in latest version of >>> CPAN.pm
>> >> You are wrong. Note the following... >> >> ---- Unsatisfied dependencies detected during ---- >> ----       ADAMK/DBD-SQLite-1.25.tar.gz       ---- >>     DBI [build_requires] >> >> That is CPAN _not_ running the Makefile.PL
> > I've spent some time digging why this happens and it seems that clear new installation of Perl doesn't have YAML.pm > installed and thus CPAN.pm doesn't check dependencies from META.yml and relies on old Makefile.PL parsing (and obviously > fails with DBD-SQLite). Full log of installation is attached if somebody is interested. > Because I tend to install CPAN-SQLite first on new Perl installations, no wander that it fails for me many times. > > While somebody may say that clean CPAN.pm (w/o YAML) installation is borked, other modules with prerequisites install > just fine, so I think it would be good to remove exit(0) from DBD-SQLite so YAML-less CPAN.pm can process it without > problems. Especially when the fix is so easy. Or there's some point in having exit(0) in Makefile.PL? > > -- > Serguei Trouchelle > > > 58c58 > <       exit(0); > ---
>> #     exit(0);
> 272,273d271 > <       require DBI; > <       require DBI::DBD; > 274a273,274
>>               require DBI; >>               require DBI::DBD;
> >
Subject: Re: [rt.cpan.org #50089] CPAN shell-friendly
Date: Wed, 30 Sep 2009 16:01:53 +0300
To: bug-DBD-SQLite [...] rt.cpan.org
From: Serguei Trouchelle <stro [...] cpan.org>
Reserved Local Account via RT wrote: Show quoted text
> Hrm, CPAN is SUPPOSED to use Parse::CPAN::Meta (which comes in the > core in 5.10.1) to parse the META.yml file. It shouldn't be using > YAML.pm...
Yes, Parse::CPAN::Meta 1.39 is installed from the start. I've made another fresh installation, and run: cpan YAML cpan CPAN::SQLite Everything went smooth, I'm attached output (incomplete, until DBI starts tests). The only difference is YAML installed prior to building CPAN::SQLite. I also noted that after installing DBI, CPAN.pm said: TIMB/DBI-1.609.tar.gz /usr/bin/make test -- OK Running make install T/TI/TIMB/DBI-1.609.tar.gz is just needed temporarily during building or testing. Do you want to install it permanently? [yes] While I confirm default "yes", I'm sure DBI is needed permanently. -- Serguei Trouchelle -- Serguei Trouchelle

Message body not shown because it is not plain text.