Opened 17 years ago

Closed 17 years ago

#11175 closed defect (fixed)

[FIX] p5-file-temp port not being used by modules requiring >0.16

Reported by: mgrimes@… Owned by: narf_tm@…
Priority: High Milestone:
Component: ports Version:
Keywords: Cc: danielluke (Daniel J. Luke),michaelm@…,markd@…
Port:

Description

Perl modules requiring File::Temp 0.17 will fail dependency checks because perl5.8 File::Temp core module is @ 0.16. Perl will use the first module it finds, not the latest module it finds, therefore like p5-pathtools, the core module needs to be overwritten.

Noted by dluke@ in #11043 comment thread. Followed the p5-pathtools approach to this problem.

Attachments (1)

p5-file-temp_r1.diff (2.6 KB) - added by mgrimes@… 17 years ago.

Download all attachments as: .zip

Change History (8)

Changed 17 years ago by mgrimes@…

Attachment: p5-file-temp_r1.diff added

comment:1 Changed 17 years ago by narf_tm@…

This patch looks like a REALLY bad idea. Perl uses the first module it finds based on the order of the paths in @INC. If you look at the order of @INC it doesn't really make sense...

perl -e "print join \"\n\", @INC"

/opt/local/lib/perl5/5.8.8/darwin-2level
/opt/local/lib/perl5/5.8.8
/opt/local/lib/perl5/site_perl/5.8.8/darwin-2level
/opt/local/lib/perl5/site_perl/5.8.8
/opt/local/lib/perl5/site_perl
/opt/local/lib/perl5/vendor_perl/5.8.8/darwin-2level
/opt/local/lib/perl5/vendor_perl/5.8.8
/opt/local/lib/perl5/vendor_perl

This problem exists for all the Perl module ports that are included as part of the Perl install. Wouldn't it make more sense to fix the path order in the "perl5.8" port so the the vendor paths are checked first?

comment:2 Changed 17 years ago by danielluke (Daniel J. Luke)

It's not a good solution, but I don't think it qualifies as 'REALLY bad idea'.

Unless the api has changed between the dist version of File::Temp and this version (because that would break things).

comment:3 Changed 17 years ago by mgrimes@…

Oh yeah I'll admit it's not a good solution, but it is better then placing faith in perl ports with failed version dependencies and not knowing if the version skew between what's used and what's required is breaking anything. I agree that we should roll with the @INC (site, vendor, perl) change that will keep us out of trouble as CPAN updates and our perl port remains @ 5.8.8. It's not easy to identify the problems here because most perl modules are pretty lenient about their requires (not requiring specific versions or perl-core modules already adhere to version requirement).

comment:4 Changed 17 years ago by danielluke (Daniel J. Luke)

The other thing to keep in mind is that if we change the @INC order to put vendor before perl, we'll have to be extra careful when adding/updating ports that override perl-dist modules.

comment:5 Changed 17 years ago by danielluke (Daniel J. Luke)

Cc: michaelm@… added

I'm going to add a new port (p5-file-temp-svkonly) to take care of this for svk2.

If we change the perl search order so that this isn't necessary anymore, we can remove the port and update svk's dependencies.

comment:6 Changed 17 years ago by markd@…

Cc: markd@… added

Can this ticket be closed?

comment:7 Changed 17 years ago by danielluke (Daniel J. Luke)

Resolution: fixed
Status: newclosed

I think it's still open to discuss changing macports perl's @INC ... but I don't know if it's really necessary (the current situation, although a little ugly, works and matches what is normally done with perl installs. While changing @INC makes sense to me and is a little cleaner from the macports view of the world but would make the perl install nonstandard and could break things that unknowingly depend on the 'normal' @INC ordering).

So, in summary, I'll close this and we won't change anything unless someone has a really good reason to do so (or wants to discuss it more).

Note: See TracTickets for help on using tickets.