Skip Menu |

This queue is for tickets about the Geo-CountryFlags CPAN distribution.

Report information
The Basics
Id: 70812
Status: rejected
Priority: 0/
Queue: Geo-CountryFlags

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

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



Subject: File::SafeDO is required during Makefile.PL so install fails
While File::SafeDO is reported as a prereq in Makefile.PL and META.yml, the Makefile.PL also attempts to load the included Util.pm which requires the file so the installation dies during Makefile.PL. File::SafeDO must be explicitly installed before Geo::CountryFlags.
On Thu Sep 08 10:49:09 2011, RWSTAUNER wrote: Show quoted text
> While File::SafeDO is reported as a prereq in Makefile.PL and META.yml, > the Makefile.PL also attempts to load the included Util.pm which > requires the file so the installation dies during Makefile.PL. > > File::SafeDO must be explicitly installed before Geo::CountryFlags.
So install it.
On Thu Sep 08 11:36:26 2011, MIKER wrote: Show quoted text
> On Thu Sep 08 10:49:09 2011, RWSTAUNER wrote:
> > While File::SafeDO is reported as a prereq in Makefile.PL and META.yml, > > the Makefile.PL also attempts to load the included Util.pm which > > requires the file so the installation dies during Makefile.PL. > > > > File::SafeDO must be explicitly installed before Geo::CountryFlags.
> > So install it.
I did. I just thought it wasn't very cpan-like (or user-friendly) to make someone scan the warnings of a failed install (possibly try to figure out why it didn't work) and then run a separate cpan command to install something they don't know they needed. That makes this module less-installable by automated tools (though I do see that cpanminus has explicit provisions to work around this sort of thing). I just thought I'd point it out in case you didn't realize.
Subject: Re: [rt.cpan.org #70812] File::SafeDO is required during Makefile.PL so install fails
Date: Thu, 08 Sep 2011 12:00:06 -0700
To: bug-Geo-CountryFlags [...] rt.cpan.org
From: michael [...] insulin-pumpers.org
Show quoted text
> Queue: Geo-CountryFlags > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=70812 > > > On Thu Sep 08 11:36:26 2011, MIKER wrote:
> > On Thu Sep 08 10:49:09 2011, RWSTAUNER wrote:
> > > While File::SafeDO is reported as a prereq in Makefile.PL and > > > META.yml, the Makefile.PL also attempts to load the included > > > Util.pm which requires the file so the installation dies during > > > Makefile.PL. > > > > > > File::SafeDO must be explicitly installed before > > > Geo::CountryFlags.
> > > > So install it.
> > I did. > > I just thought it wasn't very cpan-like (or user-friendly) to make > someone scan the warnings of a failed install (possibly try to figure > out why it didn't work) and then run a separate cpan command to > install something they don't know they needed. > > That makes this module less-installable by automated tools (though I > do see that cpanminus has explicit provisions to work around this sort > of thing). > > I just thought I'd point it out in case you didn't realize.
hmmm.... what would you suggest? I have many modules that have dependencies and I run into this situation when using other peoples modules as well. I did an install of a module yesterday that had 4 dependencies, each of those combined had another dozen dependencies, it took a couple of hours to get it all done, so I see your point. I just don't have a good solution. Michael
Show quoted text
> hmmm.... what would you suggest? I have many modules that have > dependencies and I run into this situation when using other peoples > modules as well. I did an install of a module yesterday that had 4 > dependencies, each of those combined had another dozen dependencies, > it took a couple of hours to get it all done, so I see your point. I > just don't have a good solution. > > Michael
It's expected that a module may have prereqs but typically the cpan* installers can resolve them automatically. I recall previously finding dists that use their own modules during Makefile.PL (and therefore attempt to use prereqs before being able to declare them), though if you said you had (found others out there like this) I'd certainly believe it. It just now occurred to me that this is what the 'configure_requires' key is for in the CPAN::Meta file. Applying the attached patch works for me. According to the CPAN.pm change log it should work starting with cpan 1.91_51 which is from 2007-07-07 (stable 1.92 as of 2007-09-15). The patch upgrades the META.yml to version 1.4 of the spec (where configure_requires was introduced) and adds File::SafeDO in 'configure_requires'. Prereqs listed there are attempted to be resolved before running Makefile.PL.
Subject: Geo-CountryFlags-configure_requires.patch
--- Geo-CountryFlags-1.01-4TL9Sr/META.yml 2008-10-16 19:58:36.000000000 -0700 +++ Geo-CountryFlags-1.01/META.yml 2011-09-08 16:35:37.942004745 -0700 @@ -6,9 +6,11 @@ license: ~ author: ~ generated_by: ExtUtils::MakeMaker version 6.42 distribution_type: module +configure_requires: + File::SafeDO: 0.11 requires: File::SafeDO: 0.11 LWP::Simple: 0 meta-spec: - url: http://module-build.sourceforge.net/META-spec-v1.3.html - version: 1.3 + url: http://module-build.sourceforge.net/META-spec-v1.4.html + version: 1.4
Interesting.... the META.yml that is in the CPAN distro already includes the prereqs you propose below. Perhaps your system regenerated it without File::SafeDo for some reason??? On Thu Sep 08 20:02:58 2011, RWSTAUNER wrote: Show quoted text
> > hmmm.... what would you suggest? I have many modules that have > > dependencies and I run into this situation when using other peoples > > modules as well. I did an install of a module yesterday that had 4 > > dependencies, each of those combined had another dozen dependencies, > > it took a couple of hours to get it all done, so I see your point. I > > just don't have a good solution. > > > > Michael
> > It's expected that a module may have prereqs > but typically the cpan* installers can resolve them automatically. I > recall previously finding dists that use their own modules during > Makefile.PL (and therefore attempt to use prereqs before being able to > declare them), though if you said you had (found others out there like > this) I'd certainly believe it. > > It just now occurred to me that this is what the 'configure_requires' > key is for in the CPAN::Meta file. > > Applying the attached patch works for me. > According to the CPAN.pm change log it should work starting with cpan > 1.91_51 which is from 2007-07-07 (stable 1.92 as of 2007-09-15). > > The patch upgrades the META.yml to version 1.4 of the spec (where > configure_requires was introduced) and adds File::SafeDO in > 'configure_requires'. Prereqs listed there are attempted to be resolved > before running Makefile.PL.
On Fri Nov 11 16:50:35 2011, MIKER wrote: Show quoted text
> Interesting.... the META.yml that is in the CPAN distro already includes > the prereqs you propose below. Perhaps your system regenerated it > without File::SafeDo for some reason??? >
The current release on CPAN includes those in the 'requires' section but not in 'configure_requires' which is what I was proposing: http://cpansearch.perl.org/src/MIKER/Geo-CountryFlags-1.01/META.yml they should also be declared in 'configure_requires' in order for the cpan client to install them before attempting the Makefile.PL
Yes, I understand. However the behavior that causes the auto-build difficulty is an apparent flaw in CPAN.pm that is present up through perl 5.12 distro and fixed thereafter. Patching META.yml is not satisfactory to me as it is auto generated by ExtUtils::MakeMaker and "config_requires" is deprecated in recent versions of CPAN::Meta::Spec I would prefer not to mess with this. On Fri Nov 11 19:12:12 2011, RWSTAUNER wrote: Show quoted text
> On Fri Nov 11 16:50:35 2011, MIKER wrote:
> > Interesting.... the META.yml that is in the CPAN distro already includes > > the prereqs you propose below. Perhaps your system regenerated it > > without File::SafeDo for some reason??? > >
> > The current release on CPAN includes those in the 'requires' section but > not in 'configure_requires' which is what I was proposing: > > http://cpansearch.perl.org/src/MIKER/Geo-CountryFlags-1.01/META.yml > > they should also be declared in 'configure_requires' in order for the > cpan client to install them before attempting the Makefile.PL