Skip Menu |

This queue is for tickets about the XML-Comma CPAN distribution.

Report information
The Basics
Id: 26792
Status: open
Priority: 0/
Queue: XML-Comma

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

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



Subject: 1.991 breaks toolchain
The following addition in 1.991 breaks automatic installs with the CPAN toolchain: + if($@) { + #die results in this output: "# Looks like your test died before it could output anything." + warn "missing depends, stopping to let CPAN or user get them\n"; + exit(1); + } You should never die within a Makefile.PL (unless you have to, of course). As long as you *can* write a Makefile, do it and let the rest of the toolchain care for the dirty bits like installing PREREQs. This can only work smoothely if you write your Makefile. Thing like the initalization of a database is better delayed and done within a make target.
From: cpanski [...] allafrica.com
Thank you for your continued comments, Andreas. This (the die'ing) is fixed in 1.992, which, if it isn't available through CPAN yet, can be obtained here: http://xml-comma.org/dist/XML-Comma-1.992.tgz As for initialization of the database in a seperate make target, this will have to wait a bit for the redesign of the install process (which has always been a bit of a kludgy afterthought, although I'm tyring to change that now). Thanks again, and let me know how 1.992 does!
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #26792] 1.991 breaks toolchain
Date: Mon, 30 Apr 2007 09:11:07 +0200
To: bug-XML-Comma [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Sun, 29 Apr 2007 22:01:46 -0400, "Brian Szymanski via RT" <bug-XML-Comma@rt.cpan.org> said:
Show quoted text
Show quoted text
> Thank you for your continued comments, Andreas.
Show quoted text
> This (the die'ing) is fixed in 1.992, which, if it isn't available > through CPAN yet, can be obtained here: > http://xml-comma.org/dist/XML-Comma-1.992.tgz
Show quoted text
> As for initialization of the database in a seperate make target, this > will have to wait a bit for the redesign of the install process (which > has always been a bit of a kludgy afterthought, although I'm tyring to > change that now).
Show quoted text
> Thanks again, and let me know how 1.992 does!
It's not getting better. Now the Makefile.PL lets me know Checking if your kit is complete... Looks good Writing Makefile for XML::Comma missing one or more dependencies, not running comma-create-config.pl After that it asks me no questions, so does not configure my database and goes on to make and test and of course fails the database tests. When I look into the Makefile I find there the prereqs: Compress::Zlib Crypt::Blowfish PAR Storable Lingua::Stem String::CRC Inline Test::More Crypt::CBC Class::ClassDecorator Digest::HMAC_MD5 Math::BaseCalc DBD::mysql DBI All of them are installed on my system and at the current version. Better you do not care if modules are installed or not. MakeMaker does this for you and most of the time better. Just declare your prerequisites and work along with what you have. And if you fail for some reason, be as specific as possible so that the user has a chance to correct his system before the next step. Out of curiosity I stepped into the Makefile.PL with the debugger and found main::(Makefile.PL:103): warn "missing one or more dependencies, not running comma-create-config.pl\n"; DB<3> x $pm 0 'Compress::Zlib.pm' Outch. Did you ever run your Makefile.PL yourself? -- andreas
On Mon Apr 30 03:12:30 2007, andreas.koenig.7os6VVqR@franz.ak.mind.de wrote: Show quoted text
> It's not getting better. Now the Makefile.PL lets me know > > Checking if your kit is complete... > Looks good > Writing Makefile for XML::Comma > missing one or more dependencies, not running comma-create-config.pl > > After that it asks me no questions, so does not configure my database > and goes on to make and test and of course fails the database tests. > > When I look into the Makefile I find there the prereqs: > > Compress::Zlib Crypt::Blowfish PAR Storable Lingua::Stem > String::CRC Inline Test::More Crypt::CBC Class::ClassDecorator > Digest::HMAC_MD5 Math::BaseCalc DBD::mysql DBI > > All of them are installed on my system and at the current version.
My apologies - I committed and uploaded the wrong tarball, which had a typo in it. I just verified that Makefile.PL as committed to CPAN and svn *now* works properly on clean and existing mysql installs, as well as existing Pg installs: http://xml-comma.org/dist/XML-Comma-1.993.tgz BTW, The reason for the double-checking of dependencies is so that we can avoid asking the user all sorts of configuration questions if we know they don't have a dependency they need. You're right that this would be better handled in a makefile step, but it's too close to 2.0 to rejigger our (as you can see!) fragile installation system. Here's the patch: http://chronicle.allafrica.com/viewvc/viewcvs.cgi/trunk/XML-Comma/Makefile.PL?rev=1064&r1=1063&r2=1064 Show quoted text
> Out of curiosity I stepped into the Makefile.PL with the debugger and > found > > main::(Makefile.PL:103): warn "missing one or > more dependencies, not running comma-create-config.pl\n"; > DB<3> x $pm > 0 'Compress::Zlib.pm' > > Outch. Did you ever run your Makefile.PL yourself?
Yes, but the wrong version :) Sorry for that. Also, just FYI, I am still learning how CPAN works, but I see you maintain it. Is there a way to simulate cpan installation of a tarball, so it would attempt to auto-resolve, build, and fetch dependencies and all that? It would help me avoid some of this testing-thru-CPAN stuff I am doing at the moment (to your chagrin!) since I have the luxury of knowing anyone who's likely to install comma, and comma never used to install right out of CPAN anyway (but of course I'd like to change both of those facts!) Thanks again!
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #26792] 1.991 breaks toolchain
Date: Mon, 30 Apr 2007 19:17:46 +0200
To: bug-XML-Comma [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Mon, 30 Apr 2007 04:12:40 -0400, "Brian Szymanski via RT" <bug-XML-Comma@rt.cpan.org> said:
Show quoted text
>> Outch. Did you ever run your Makefile.PL yourself?
Show quoted text
> Yes, but the wrong version :) Sorry for that.
What a cute mistake:) Show quoted text
> Also, just FYI, I am still learning how CPAN works, but I see you > maintain it. Is there a way to simulate cpan installation of a tarball, > so it would attempt to auto-resolve, build, and fetch dependencies and > all that?
Upgrade your CPAN.pm to 1.9101, chdir to the root directory of your sources, run 'cpan .'. Or, to be even closer to real conditions: roll your tarball, unroll it somewhere else, go to *its* root directory and do the 'cpan .' there. (When I say 'root directory' I mean the directory where your Makefile.PL is) If your CPAN.pm is configured properly, it should work exactly as later on the user's site. In the meantime I have run your tests successfully to the end. When I tried to 'make install', somebody tried to run 'perl misc/install-extras.pl' and failed miserably. Of course! It's never 'perl' it's always $^X. You cannot presume that the first perl in the path is the one we are installing right now. My perl is NOT in the path at all. But at least we are through the 'make test' stage now. Don't give up now:) Show quoted text
> It would help me avoid some of this testing-thru-CPAN stuff I > am doing at the moment (to your chagrin!) since I have the luxury of > knowing anyone who's likely to install comma, and comma never used to > install right out of CPAN anyway (but of course I'd like to change both > of those facts!)
Show quoted text
> Thanks again!
Thanks to you for going through all this humpty dumpty;) -- andreas
Show quoted text
> What a cute mistake:)
The Damerau-Levenshtein distance between the uploaded code and working code was only 1! Show quoted text
> Upgrade your CPAN.pm to 1.9101, chdir to the root directory of your > sources, run 'cpan .'. > > Or, to be even closer to real conditions: roll your tarball, unroll it > somewhere else, go to *its* root directory and do the 'cpan .' there. > > (When I say 'root directory' I mean the directory where your > Makefile.PL is) > > If your CPAN.pm is configured properly, it should work exactly as > later on the user's site.
Yea, I found this in the meantime (Imagine it, RTFM'ing ! ;), thanks! Show quoted text
> In the meantime I have run your tests successfully to the end. When I > tried to 'make install', somebody tried to run 'perl > misc/install-extras.pl' and failed miserably. Of course! It's never > 'perl' it's always $^X. You cannot presume that the first perl in the > path is the one we are installing right now. My perl is NOT in the > path at all.
Interesting. Never used that magic variable before. I applied this in 1.994: http://xml-comma.org/dist/XML-Comma-1.994.tgz Show quoted text
> Thanks to you for going through all this humpty dumpty;)
Thank you very much for your patience while I kludge together a slightly more usable install process :) Let me know if you encounter any further issues... BTW, if you want to see some more recent, cleaner example than what's available on the website, drop a line my way and I'll see what I can dig up for you. Cheers, Brian
Subject: Re: [rt.cpan.org #26792] 1.991 breaks toolchain
Date: Sun, 06 May 2007 08:34:39 -0400
To: bug-XML-Comma [...] rt.cpan.org
From: Brian Szymanski <ski [...] allafrica.com>
Andreas Koenig via RT wrote: Show quoted text
> Thing like the initalization of a database is better delayed and done > within a make target. >
I'm going to take a look at this now... Andreas, do you know what make target I should be pointing at? Alternatively, do you know of any cpan modules that do db configuration the "right way"? I went searching and only found some that did it ina similar way to the way comma does it right now (that is to say, the wrong way, all in Makefile.PL)... Any ideas or pointers would be appreciated. Thanks, Brian -- Brian Szymanski
CC: ANDK [...] cpan.org
Subject: Re: [rt.cpan.org #26792] 1.991 breaks toolchain
Date: Sun, 06 May 2007 21:27:52 +0200
To: bug-XML-Comma [...] rt.cpan.org
From: andreas.koenig.7os6VVqR [...] franz.ak.mind.de (Andreas J. Koenig)
Show quoted text
>>>>> On Sun, 06 May 2007 08:38:07 -0400, "Brian Szymanski via RT" <bug-XML-Comma@rt.cpan.org> said:
Show quoted text
Show quoted text
> Andreas Koenig via RT wrote:
>> Thing like the initalization of a database is better delayed and done >> within a make target. >>
> I'm going to take a look at this now... Andreas, do you know what make > target I should be pointing at? Alternatively, do you know of any cpan > modules that do db configuration the "right way"? I went searching and > only found some that did it ina similar way to the way comma does it > right now (that is to say, the wrong way, all in Makefile.PL)... Any > ideas or pointers would be appreciated.
I meant something like this, but I'm writing this off the top of my head, so maybe it's not perfectly valid: sub MY::postamble { my($self) = @_; return qq{ all :: initdb initdb: \t\$(PERL) bin/comma-create-config.pl }; } If you add this to your Makefile.PL, then the bin/comma-create-config.pl script should be executed during the 'make' command. Besides you can tell the user that he may call 'make initdb' anytime later again in case it fails for some reason. -- andreas