Opened 12 years ago

Closed 9 years ago

Last modified 6 years ago

#16830 closed enhancement (fixed)

RFE: Have only one perl5 package

Reported by: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez) Owned by: ghosthound
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: Cc: afb@…, danielluke (Daniel J. Luke), febeling@…, vinc17@…, ghosthound, blb@…, ryandesign (Ryan Schmidt), jason@…, tommyd@…, dreamind@…, takashi@…, jpo@…, jabronson@…, ematiu@…, mjg@…, Markus.Ueberall@…, tomas.znamenacek@…, steve@…, sorin.sbarnea@…, cooljeanius (Eric Gallager)
Port: perl5, perl5.8, perl5.10

Description

Is there a compelling reason why there are two packages for Perl 5?
May I suggest that perl5.8 be removed and perl5.10 become perl5.

  • perl5.8 is unmaintained.
  • Perl 5.10 has been been the official Perl since December.
  • It would preclude the need for some sort of perl_select package.

I am not an expert in Perl development, so perhaps there are good reasons for keeping perl5.8 around, but if not, then having just one perl5 package would be a relatively easy (and simplifying) change to make.

Attachments (3)

default-perl-5.10.diff (6.4 KB) - added by jmroot (Joshua Root) 11 years ago.
updated patch
mod_perl2_with_perl5.10.diff (817 bytes) - added by ematiu@… 11 years ago.
mod_perl patch for perl5.10
perl5.Portfile.diff (3.7 KB) - added by ghosthound 10 years ago.
patch for perl5 Portfile to clean it up, default to perl5.8, variant perl5_10 for perl5.10

Download all attachments as: .zip

Change History (82)

comment:1 Changed 12 years ago by danielluke (Daniel J. Luke)

CPAN still lists 5.8.8 as recommended for stable production use, which would be a good reason to keep it around.

I think defaulting to 5.10.0 and having it install ${prefix}/bin/perl and requiring anything that wants to have the older perl5.8 to use ${prefix}/bin/perl5.8 instead would be good, though.

(and/or something like perl_select).

comment:2 Changed 12 years ago by afb@…

Asked this on the mailing list earlier, but there were no real decisions made: http://lists.macosforge.org/pipermail/macports-dev/2007-December/003911.html

So it was easiest to just leave it, as Perl had bigger issues with the modules. But deleting /opt/local/bin/perl and adding a perl_select isn't too complicated.

comment:3 Changed 12 years ago by danielluke (Daniel J. Luke)

Cc: dluke@… added

Cc Me!

comment:4 in reply to:  description Changed 12 years ago by afb@…

Is there a compelling reason why there are two packages for Perl 5?
May I suggest that perl5.8 be removed and perl5.10 become perl5.

  • perl5.8 is unmaintained.
  • Perl 5.10 has been been the official Perl since December.

As originally proposed, this suggesstion is a non-starter... It would be rather unusual for one port to disappear and to change the name of the "perl5.10" port (odd as it is).

However, changing the "default perl" to Perl 5.10 is certainly doable even if annoying due to all "port:perl5.8"

The other misunderstanding is that perl5.10 is maintained, I'll clear that up.

comment:5 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Owner: changed from macports-tickets@… to mcalhoun@…
Status: newassigned

How about this strategy?

  • Create a perl5 package.
  • perl5 would install ${prefix}/bin/perl (no version appending).
  • perl5 would initially use version 5.8 since 5.10.0 is still a test release.
  • When 5.10.1 is released, then perl5 would switch its ${version} to 5.10.
  • perl5 would use the latest maintenance Perl 5 version (5.12 etc).
  • perl5-1.0.tcl would be modified to depend on perl5 (instead of perl5.8).

A big advantage is that this strategy avoids the need to have separate p5-* packages for each Perl 5 version (as happened with Python).

To accommodate perl5

  • perl5.8 and perl5.10 would be modified to avoid conflict with perl5.
  • Packages which depend on port:perl5.8 would have to be changed immediately.
  • Packages which depend on path:${prefix}/bin/perl:perl5.8 or bin:perl:perl5.8 should be changed eventually.

Are there any thoughts on this strategy?
I would be happy to do the heavy lifting on any changes (including changing unmaintained ports).

comment:6 Changed 12 years ago by danielluke (Daniel J. Luke)

That seems OK to me, although I'm also happy with just having perl5.10 become the default perl for us already.

The one issue I still see would be with upgrading, an unknown number of p5 ports that were installed for perl5.8 would need to be rebuilt to work with perl5.10 - and we don't have a good way of exposing that to macports (usually in cases like that, we end up resorting to rev-bumping things that haven't changed so that people rebuild them).

I would lean towards having perl5.8 no longer install ${prefix}/bin/perl, have perl5.10 do that, and update the group code and other ports to depend on perl5.10 unless they specifically need perl5.8 for some reason.

[And then someone needs to tackle the whole @INC ordering or other work-around for building newer versions of modules that get installed with the perl port.]

comment:7 Changed 12 years ago by febeling@…

Cc: febeling@… added

Cc Me!

comment:8 Changed 12 years ago by vinc17@…

Cc: vinc17@… added

Cc Me!

comment:9 in reply to:  6 Changed 12 years ago by vinc17@…

Replying to dluke@…:

That seems OK to me, although I'm also happy with just having perl5.10 become the default perl for us already.

I agree with that. Perl 5.10 will even be in Debian/stable. So, I suppose that the main problems have been solved.

[And then someone needs to tackle the whole @INC ordering or other work-around for building newer versions of modules that get installed with the perl port.]

I'd say that for the time being, there is no need to replace core modules with perl 5.10 (since it is recent enough). But the problem may arise in the future.

comment:10 Changed 12 years ago by ghosthound

Cc: ricci@… added

Cc Me!

comment:11 in reply to:  5 ; Changed 12 years ago by ghosthound

Replying to mcalhoun@…:

How about this strategy?

  • Create a perl5 package.
  • perl5 would install ${prefix}/bin/perl (no version appending).
  • perl5 would initially use version 5.8 since 5.10.0 is still a test release.
  • When 5.10.1 is released, then perl5 would switch its ${version} to 5.10.
  • perl5 would use the latest maintenance Perl 5 version (5.12 etc).
  • perl5-1.0.tcl would be modified to depend on perl5 (instead of perl5.8).

A big advantage is that this strategy avoids the need to have separate p5-* packages for each Perl 5 version (as happened with Python).

To accommodate perl5

  • perl5.8 and perl5.10 would be modified to avoid conflict with perl5.
  • Packages which depend on port:perl5.8 would have to be changed immediately.
  • Packages which depend on path:${prefix}/bin/perl:perl5.8 or bin:perl:perl5.8 should be changed eventually.

Are there any thoughts on this strategy?
I would be happy to do the heavy lifting on any changes (including changing unmaintained ports).

I don't think we should switch to perl5.10 yet - as was noted its still in 'testing' and for those of us that use perl for "production" work using a 'testing' version is a Bad Thing(tm).

I like the concept of a common perl5 port that can cover perl5.8 and perl5.10 (and ideally, later). I'm not seeing how this will work, given that some perl modules will need to be recompiled if a user switches between perl5.8 and perl5.10, and we don't have a way for macports to know about those modules (as dluke has pointed out).

I don't think we should alter perl's @INC to use a common space (for those that don't know, perl creates versioned directories for modules, aka ${prefix}/lib/perl5/5.8.8/, ${prefix}/lib/perl5/vendor_perl/5.8.8/) as that will make it impossible to have both perl5.8 and perl5.10 (and later versions) installed at the same time.

Hmmm. If we have something that sets the 'active' perl version, and we teach 'port' (presumably something in the perl portgroup...) how to read that, that might just get us to the point where port does know if it needs to rebuild a perl module or not. Do we have anything like that now?

p.s. I've taken maintainership of both perl5.8 and perl5.10 (with openmaintainer). If anyone else wants to share please feel free to add yourself or drop me a note and I can add you.

comment:12 in reply to:  11 ; Changed 12 years ago by danielluke (Daniel J. Luke)

Replying to ricci@…:

I don't think we should switch to perl5.10 yet - as was noted its still in 'testing' and for those of us that use perl for "production" work using a 'testing' version is a Bad Thing(tm).

It's 'testing' as opposed to 'maintenance' and is what is recommended for new installs.

I don't think we should alter perl's @INC to use a common space (for those that don't know, perl creates versioned directories for modules, aka ${prefix}/lib/perl5/5.8.8/, ${prefix}/lib/perl5/vendor_perl/5.8.8/) as that will make it impossible to have both perl5.8 and perl5.10 (and later versions) installed at the same time.

The @INC changes I was referring to would let us install perl modules of more recent versions than the included modules and have a simple 'use module;' pick up the new version. There should be at least one open ticket that discusses this (along with other possible solutions). vinc17 is right, though, that that won't be an immediate issues since perl5.10 doesn't have the same problem with outdated core modules as per5.8 does.

comment:13 in reply to:  12 ; Changed 12 years ago by ghosthound

Replying to dluke@…:

Replying to ricci@…:

I don't think we should switch to perl5.10 yet - as was noted its still in 'testing' and for those of us that use perl for "production" work using a 'testing' version is a Bad Thing(tm).

It's 'testing' as opposed to 'maintenance' and is what is recommended for new installs.

Their language isn't the best (on http://cpan.org/src/README.html), they start off the paragraph with:

For stable production use the maint branches are recommended.

Then end the paragraph with:

but you should still start using them.

To me that says they want you to use 5.10.0 so it gets widespread testing, but if you have production-quality needs, you should use a version that's in 'maint' rather than 'testing'. I don't see anywhere else where 5.10.0 is recommended for new installs.

I don't think we should alter perl's @INC to use a common space (for those that don't know, perl creates versioned directories for modules, aka ${prefix}/lib/perl5/5.8.8/, ${prefix}/lib/perl5/vendor_perl/5.8.8/) as that will make it impossible to have both perl5.8 and perl5.10 (and later versions) installed at the same time.

The @INC changes I was referring to would let us install perl modules of more recent versions than the included modules and have a simple 'use module;' pick up the new version. There should be at least one open ticket that discusses this (along with other possible solutions). vinc17 is right, though, that that won't be an immediate issues since perl5.10 doesn't have the same problem with outdated core modules as per5.8 does.

Yes, I read that your description of the @INC change was the inversion of the @INC paths so that the macports-installed versions would be picked up first (I see tickets #12710 and #12950 exist about this, there may be more), I was commenting more about the dangers using a non-versioned @INC path. I'm all for doing the @INC inversion (ala FreeBSD ports).

comment:14 in reply to:  13 Changed 12 years ago by danielluke (Daniel J. Luke)

Replying to ricci@…:

Their language isn't the best

I totally agree.

To me that says they want you to use 5.10.0 so it gets widespread testing, but if you have production-quality needs, you should use a version that's in

'maint' rather than 'testing'. I don't see anywhere else where 5.10.0 is recommended for new installs.

http://www.perl.org/get.html "Stable Release -> Perl 5.10.0, Previous Stable Release -> Perl 5.8.8"

Debian/stable picking up 5.10.0 is indicative of its status as well.

Yes, I read that your description of the @INC change was the inversion of the @INC paths so that the macports-installed versions would be picked up first (I see tickets #12710 and #12950 exist about this, there may be more), I was commenting more about the dangers using a non-versioned @INC path.

Yep. (I'll leave it to others to decide if those problems are easier or harder to solve).

I'm all for doing the @INC inversion (ala FreeBSD ports).

comment:15 in reply to:  11 ; Changed 12 years ago by vinc17@…

Replying to ricci@…:

I don't think we should switch to perl5.10 yet - as was noted its still in 'testing' and for those of us that use perl for "production" work using a 'testing' version is a Bad Thing(tm).

With this reasoning, MacPorts should never replace a core module by a later version, because this later version is in testing (or worse). This means that the change of the @INC path must not be global, but should be done locally by software that needs later versions.

comment:16 in reply to:  15 ; Changed 12 years ago by danielluke (Daniel J. Luke)

Replying to vinc17@…:

With this reasoning, MacPorts should never replace a core module by a later version, because this later version is in testing (or worse). This means that the change of the @INC path must not be global, but should be done locally by software that needs later versions.

That would only be true if the module authors only released 'stable' versions of those modules with 'stable' versions of perl (which isn't the case).

So, while I appreciate the attempt at argument (and even agree with the conclusion of having perl5.10 be the default), it doesn't really follow the same logic.

comment:17 in reply to:  16 Changed 12 years ago by vinc17@…

Replying to dluke@…:

That would only be true if the module authors only released 'stable' versions of those modules with 'stable' versions of perl (which isn't the case).

Only versions that goes back to the stable branch in question (e.g. because an important bug is fixed) are stable (individual authors of core modules can't decide for the whole project). But in such a case, you don't need a separate port for these modules: the upgrade of the perl port would be sufficient. BTW, that's the whole point of the stable status: don't introduce changes that could affect other software, just fix bugs (with special care of possible side effects).

The question is whether you want perl + its core modules to be stable in MacPorts (meaning remain with the latest perl 5.8.x and the core modules distributed with it) or choose new versions as soon as they are released (or well tested[*], which is the case of perl 5.10).

[*] This wasn't the case of perl 5.10.0 when it was released; that's why that was a testing release. But this was 9 months ago, and since then, there has been 9 months of testing.

comment:18 Changed 12 years ago by jmroot (Joshua Root)

I don't like that perl5 is just a clone of perl5.8; they conflict and there are ports that depend on both. Couldn't perl5 install nothing but a ${prefix}/bin/perl symlink, and depend on whichever perl5.x we decide is preferred?

comment:19 Changed 12 years ago by raimue (Rainer Müller)

The p5-* module ports already work with both versions of perl, they just need a correct ${prefix}/bin/perl symlink. But you can't install modules for both versions at the same time.

Do you want perl5 with +perl5.8 and +perl5.10 variants which add dependencies and create symlinks? Or create a perl_select package as we have for python now?

We should agree on one method (*_select or variants) and use it for all ports for which we provide multiple versions (python, ruby, perl).

comment:20 Changed 12 years ago by jmroot (Joshua Root)

Just as long as the conflict between perl5.8 and perl5 is fixed ASAP I'll be happy. I can't upgrade autoconf because I have perl5.8 installed, for example.

comment:21 Changed 12 years ago by jmroot (Joshua Root)

The problem with upgrading autoconf is actually that depspecs are auto-escaped, so variable substitution is not done, so it ends up looking for /opt/local/\${prefix}/bin/perl (because the prefix is prepended to any path that doesn't start with a slash.)

comment:22 in reply to:  19 Changed 12 years ago by vinc17@…

Replying to raimue@…:

We should agree on one method (*_select or variants) and use it for all ports for which we provide multiple versions (python, ruby, perl).

But is there any reason to have multiple versions for perl? Why not simply upgrade to perl 5.10? (For instance, Debian did this.)

comment:23 in reply to:  5 ; Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Thanks for the autoconf fix.
I did not know the correct use of path dependency.
The incorrect form seems to be in other ports as well (including perl5-1.0.tcl).

Previously, I had not gotton any objections to the strategy in comment 5 (http://trac.macports.org/ticket/16830#comment:5).
I was in the midst of implementing it.
If this is not a good idea, I can change course.

The basic strategy is:

  • have perl5 be the main perl port.
  • have perl5.8 and perl5.10 still exist but only for specialized needs.

In the long term, I think that this a reasonable strategy because after the initial pain, it will be easy to maintain without
perl_select, smylinks, or a plethora of p5- ports.

I fooled around with having perl5-1.0.tcl have +perl5, perl5.8, and +perl5.10 variants.
Perhaps it is my Tcl skills, but it was a difficult task (even with the python example).
In the end, it was ugly and didn't work with any p5- port which made use of ${perl5.lib} (e.g. p5-xml-sax).

To the objection that perl5.8 and perl5 are basically the same:
Upon the next MacPorts version release, perl5-1.0.tcl will be modified so that it no longer depends on perl5.8.
At that point perl5.8 could install to a different location just in case a user needs 5.8 (perl5 will eventually upgrade 5.10).

To the objection that perl5.10 should be used:
I was trying to make the transition from perl5.8 to perl5 as painless as possible.
At least one p5-* port breaks with perl5.10.
I did not know that Debian was using perl5.10, but Gentoo is still using 5.8.8.
I don't think it's a bad idea for perl5 to be the maintenance release, which is still 5.8.8.

comment:24 in reply to:  23 Changed 12 years ago by ryandesign (Ryan Schmidt)

Replying to mcalhoun@…:

Replying to jmr@…:

The problem with upgrading autoconf is actually that depspecs are auto-escaped, so variable substitution is not done, so it ends up looking for /opt/local/\${prefix}/bin/perl (because the prefix is prepended to any path that doesn't start with a slash.)

Thanks for the autoconf fix.
I did not know the correct use of path dependency.
The incorrect form seems to be in other ports as well (including perl5-1.0.tcl).

IMHO, the "incorrect form" that's currently in use in every other port is the correct form. That MacPorts is not handling it as documented is a bug that we should fix.

comment:25 in reply to:  23 Changed 12 years ago by vinc17@…

Replying to mcalhoun@…:

To the objection that perl5.10 should be used:
I was trying to make the transition from perl5.8 to perl5 as painless as possible.
At least one p5-* port breaks with perl5.10.

Which one? Has a bug been reported against this port? Perhaps a fix is already available.

I don't think this is really a problem. Upgrades often introduce bugs, and this is not specific to perl. On the other hand, old bugs are also fixed.

I did not know that Debian was using perl5.10, but Gentoo is still using 5.8.8.
I don't think it's a bad idea for perl5 to be the maintenance release, which is still 5.8.8.

5.10.0 is the stable release and the 5.8 branch is no longer maintained. When 5.10.0 was released, it was in a testing status, but this was 10 months ago, and IMHO, this status now is out-of-date.

comment:26 Changed 12 years ago by blb@…

Cc: blb@… added

If we go with perl5 being the primary port for perl, there needs to be some way to handle when its version changes since modules are installed in a version-specific subdir, eg (for p5-uri):

${prefix}/lib/perl5/vendor_perl/5.8.8/URI.pm

So if you upgrade perl5 (I did to 5.10.0 as a test), then try to use p5-uri (/Users/blb/MacPorts/mp-test being ${prefix} here):

$ ~/MacPorts/mp-test/bin/perl5 -e 'require URI;'
Can't locate URI.pm in @INC (@INC contains: /Users/blb/MacPorts/mp-test/lib/perl5/5.10.0/darwin-2level /Users/blb/MacPorts/mp-test/lib/perl5/5.10.0 /Users/blb/MacPorts/mp-test/lib/perl5/site_perl/5.10.0/darwin-2level /Users/blb/MacPorts/mp-test/lib/perl5/site_perl/5.10.0 /Users/blb/MacPorts/mp-test/lib/perl5/vendor_perl/5.10.0/darwin-2level /Users/blb/MacPorts/mp-test/lib/perl5/vendor_perl/5.10.0 /Users/blb/MacPorts/mp-test/lib/perl5/vendor_perl .) at -e line 1.

comment:27 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

When the PortGroup perl5 is updated to depend on perl5, then I believe this will happen automatically.
Each p5- port will depend on perl5, so when perl5 is upgraded, they will have to be upgraded as well into the correct directory.
Unless, of course, the user enters port -n upgrade perl5.

Am I characterizing the upgrade process correctly?

comment:28 Changed 12 years ago by blb@…

A 'port upgrade' won't hit the modules if they appear to be the same version (eg, for p5-uri, 1.35_1). Since MacPorts doesn't have a way of saying 'this port needs to be rebuilt when a dependency is upgraded', the only way to force it would be to bump the revision. On all modules...

comment:29 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

When upgrading, I always use the uninstall option instead of the deactivate option.
As a result, I had forgotten what upgrade normally does.

Updating the reversion number of 614 p5- ports for every perl upgrade doesn't sound good.
Then there are the ports like graphviz which can install perl modules as well.

Drat.

Perhaps upon a perl5 upgrade (say 5.8.8 -> 5.10), post-activate can search through ${prefix}/lib/perl5/vendor_perl/5.8.8/,
find the ports which installed modules, then force a rebuild using system call to "port -f upgrade ${port}".

Assuming this idea even works, it's far from ideal, but, short of changing the MacPorts base, I can't think of anything else.

comment:30 in reply to:  29 ; Changed 12 years ago by blb@…

Replying to mcalhoun@…:

Perhaps upon a perl5 upgrade (say 5.8.8 -> 5.10), post-activate can search through ${prefix}/lib/perl5/vendor_perl/5.8.8/,
find the ports which installed modules, then force a rebuild using system call to "port -f upgrade ${port}".

Assuming this idea even works, it's far from ideal, but, short of changing the MacPorts base, I can't think of anything else.

What base could use is some sort of force_rebuild_dependents option in a port's Portfile, which would cause all dependent ports to be rebuilt when the given port is installed. There have been a few instances where this would be useful, but it is otherwise somewhat esoteric.

comment:31 in reply to:  29 Changed 12 years ago by danielluke (Daniel J. Luke)

Replying to mcalhoun@…:

Perhaps upon a perl5 upgrade (say 5.8.8 -> 5.10), post-activate can search through ${prefix}/lib/perl5/vendor_perl/5.8.8/,
find the ports which installed modules, then force a rebuild using system call to "port -f upgrade ${port}".

This sort of thing has been suggested and tried before (for smoothing over port name changes, for instance) but there are some problems with running two instances of port simultaneously (and base/ wasn't designed for this - so it would probably take as much effort or more to make this work right as it would to make base/ support what needs to be done in a less hackish way).

comment:32 Changed 12 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added
Port: perl5 perl5.8 perl5.10 added

comment:33 in reply to:  21 Changed 12 years ago by ryandesign (Ryan Schmidt)

Replying to jmr@…:

The problem with upgrading autoconf is actually that depspecs are auto-escaped, so variable substitution is not done, so it ends up looking for /opt/local/\${prefix}/bin/perl (because the prefix is prepended to any path that doesn't start with a slash.)

I filed a bug for this: #17182.

comment:34 in reply to:  30 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to blb@…:

What base could use is some sort of force_rebuild_dependents option in a port's Portfile, which would cause all dependent ports to be rebuilt when the given port is installed. There have been a few instances where this would be useful, but it is otherwise somewhat esoteric.

I have proposed something like that in #17473.

comment:35 in reply to:  18 ; Changed 12 years ago by jmroot (Joshua Root)

Replying to jmr@…:

I don't like that perl5 is just a clone of perl5.8; they conflict and there are ports that depend on both. Couldn't perl5 install nothing but a ${prefix}/bin/perl symlink, and depend on whichever perl5.x we decide is preferred?

From the number of tickets being filed because of the conflict, it looks like this would be saving a lot of user pain. Is there any reason for not doing it this way? (I don't see one given in the comments.)

comment:36 in reply to:  35 Changed 12 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to jmr@…:

Replying to jmr@…:

I don't like that perl5 is just a clone of perl5.8; they conflict and there are ports that depend on both. Couldn't perl5 install nothing but a ${prefix}/bin/perl symlink, and depend on whichever perl5.x we decide is preferred?

From the number of tickets being filed because of the conflict, it looks like this would be saving a lot of user pain. Is there any reason for not doing it this way? (I don't see one given in the comments.)

A little of the user pain was caused by #17182.
Most of the user pain, however, has been caused by a lack of foresight on my part.
If the dependency tree of large_port has, at some point, dependencies on path:bin/perl:perl5.8 and path:bin/perl:perl5, then

port install perl5.8 && port install large_port (no problem)
port install perl5 && port install large_port (no problem)
port install large_port (problem)

Most ports have been moved to the form path:bin/perl:perl5, but PortGroup perl5 can not be until the next version of MacPorts is released (it has been changed in r42484 and r42584).
Unfortunately, reports of this problem did not start coming in until after most ports had been changed to path:bin/perl:perl5.
Fortunately, almost all of them will stop as soon as the next MacPorts is released.

Couldn't perl5 install nothing but a ${prefix}/bin/perl symlink, and depend on whichever perl5.x we decide is preferred?

I think that transition would be even more difficult.
Simultaneously, we would have to change perl5.8 to not install ${prefix}/bin/perl and increase the revision number of all ports which expect ${prefix}/bin/perl to be provided by perl5.8.

Despite the problems, I still think this transition has been well worth it.
Previously, most ports depended on port:perl5.8 and expected it to provide ${prefix}/bin/perl, so an upgrade to Perl 5.10 still would have required many port changes.
We have also avoided the fate of python, where each port must take into consideration 2 to 4 different versions of python.

Just to reiterate, the long term goal is that, once we have the ability to force users to upgrade dependencies (see #17473), then we can

  • Change perl5.8 so that it doesn't conflict with perl5 (and doesn't provide ${prefix}/bin/perl)
  • Force users to upgrade all ports which depend on perl5.8.
  • Live happily ever after (at least until Perl 6 comes out).

comment:37 Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Due to the continuing conflict between perl5 and perl5.8, I made perl5 into a placeholder port which depends on perl5.8 (r43286).
When the next MacPorts is released and all the p5- port start depending on perl5, perhaps then would be a good time to change it back.

comment:38 in reply to:  37 ; Changed 11 years ago by jason@…

Replying to mcalhoun@…:

Due to the continuing conflict between perl5 and perl5.8, I made perl5 into a placeholder port which depends on perl5.8 (r43286).
When the next MacPorts is released and all the p5- port start depending on perl5, perhaps then would be a good time to change it back.

Something isn't working correctly now. These are the perl executables in my bin folder:

-rwxr-xr-x  2 root  admin  1147556 Dec 23 06:29 perl
-rwxr-xr-x  1 root  admin  1147556 Nov 20 16:05 perl.mp_1227218499
-rwxr-xr-x  1 root  admin  1147556 Nov 20 20:15 perl.mp_1227230449
lrwxr-xr-x  1 root  admin        9 Dec 23 06:31 perl5 -> perl5.8.8
lrwxr-xr-x  1 root  admin       24 Dec 23 06:31 perl5.8 -> /opt/local/bin/perl5.8.8
-rwxr-xr-x  2 root  admin  1147556 Dec 23 06:29 perl5.8.8
-rwxr-xr-x  1 root  admin  1147556 Nov 20 16:05 perl5.8.8.mp_1227218499
-rwxr-xr-x  1 root  admin  1147556 Nov 20 20:15 perl5.8.8.mp_1227230449

So you can see the problem is perl5 and perl5.8 now just point to each other. So if something tries to execute either one, a failure occurs. I tried forcing and uninstall of perl5 and perl5.8 & reinstalling just to be sure this is the current behavior.

comment:39 in reply to:  38 ; Changed 11 years ago by jason@…

Sorry, directory structure didn't format correctly:

-rwxr-xr-x  2 root  admin  1147556 Dec 23 06:29 perl
-rwxr-xr-x  1 root  admin  1147556 Nov 20 16:05 perl.mp_1227218499
-rwxr-xr-x  1 root  admin  1147556 Nov 20 20:15 perl.mp_1227230449
-lrwxr-xr-x  1 root  admin        9 Dec 23 06:31 perl5 -> perl5.8.8
-lrwxr-xr-x  1 root  admin       24 Dec 23 06:31 perl5.8 -> /opt/local/bin/perl5.8.8
-rwxr-xr-x  2 root  admin  1147556 Dec 23 06:29 perl5.8.8
-rwxr-xr-x  1 root  admin  1147556 Nov 20 16:05 perl5.8.8.mp_1227218499
-rwxr-xr-x  1 root  admin  1147556 Nov 20 20:15 perl5.8.8.mp_1227230449

Replying to jason@…:

Replying to mcalhoun@…:

Due to the continuing conflict between perl5 and perl5.8, I made perl5 into a placeholder port which depends on perl5.8 (r43286).
When the next MacPorts is released and all the p5- port start depending on perl5, perhaps then would be a good time to change it back.

Something isn't working correctly now. These are the perl executables in my bin folder:

-rwxr-xr-x 2 root admin 1147556 Dec 23 06:29 perl -rwxr-xr-x 1 root admin 1147556 Nov 20 16:05 perl.mp_1227218499 -rwxr-xr-x 1 root admin 1147556 Nov 20 20:15 perl.mp_1227230449 lrwxr-xr-x 1 root admin 9 Dec 23 06:31 perl5 -> perl5.8.8 lrwxr-xr-x 1 root admin 24 Dec 23 06:31 perl5.8 -> /opt/local/bin/perl5.8.8 -rwxr-xr-x 2 root admin 1147556 Dec 23 06:29 perl5.8.8 -rwxr-xr-x 1 root admin 1147556 Nov 20 16:05 perl5.8.8.mp_1227218499 -rwxr-xr-x 1 root admin 1147556 Nov 20 20:15 perl5.8.8.mp_1227230449

So you can see the problem is perl5 and perl5.8 now just point to each other. So if something tries to execute either one, a failure occurs. I tried forcing and uninstall of perl5 and perl5.8 & reinstalling just to be sure this is the current behavior.

comment:40 Changed 11 years ago by jason@…

Cc: jason@… added

Cc Me!

comment:41 Changed 11 years ago by jason@…

Cc: jason@… removed

Cc Me!

comment:42 Changed 11 years ago by jason@…

Cc: jason@… added

Cc Me!

comment:43 in reply to:  38 Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Replying to jason@…:

So you can see the problem is perl5 and perl5.8 now just point to each other. So if something tries to execute either one, a failure occurs. I tried forcing and uninstall of perl5 and perl5.8 & reinstalling just to be sure this is the current behavior.

From what I can see, perl5 and perl5.8 both point to perl5.8.8, which is an executable.
Why is this not correct?

On my machine,

/opt/local/bin/perl5 --version
/opt/local/bin/perl5.8 --version
/opt/local/bin/perl5.8.8 --version

all run.

What is the failure?

comment:44 in reply to:  39 Changed 11 years ago by ryandesign (Ryan Schmidt)

Replying to jason@…:

Sorry, directory structure didn't format correctly

You need to use WikiFormatting. :)

comment:45 Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

I believe that all perl5.8 dependencies have been removed except from those ports that want it.

The following ports depend on perl5.8 but ensure that the perl binary is ${prefix}/bin/perl5.8: lang/ghc security/libpreludedb sysutils/rpm-devel sysutils/rpm sysutils/rpm45 sysutils/rpm50 sysutils/rpm51 sysutils/rsnapshot

comment:46 Changed 11 years ago by tommyd@…

Cc: tommyd@… added

Cc Me!

comment:47 Changed 11 years ago by dreamind@…

Cc: dreamind@… added

Cc Me!

comment:48 Changed 11 years ago by mechanic@…

It seems everything is in place now. What's the current roadmap?

comment:49 Changed 11 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

perl5 was initially created to be the latest maintenance release of perl, which is still 5.8.9 until 5.10.1 is released.
So the plan at this point is to

  • Wait until 5.10.1 is out.
  • Change perl5.8 so it does not conflict.
  • Have perl5 install software instead of being a stub package.

comment:50 Changed 11 years ago by (none)

Milestone: Port Enhancements

Milestone Port Enhancements deleted

comment:51 Changed 11 years ago by protsman@…

Cc: protsman@… added

Cc Me!

comment:52 Changed 11 years ago by protsman@…

Cc: protsman@… removed

Cc Me!

comment:53 Changed 11 years ago by ghosthound

Owner: changed from mcalhoun@… to ricci@…
Status: assignednew

For the 'default-perl-5.10.diff' patch added, I don't like the idea of having perl5.10 search perl5.8.x module paths - especially for those that are compiled - I'd fully expect them to break. Do we have a way to make all perl modules rebuild on a change to this port (I think no...)?

comment:54 Changed 11 years ago by ghosthound

Status: newassigned

comment:55 Changed 11 years ago by mechanic@…

Perl version 5.10.1 has been officially released.

comment:56 in reply to:  53 Changed 11 years ago by ryandesign (Ryan Schmidt)

Replying to ricci@…:

Do we have a way to make all perl modules rebuild on a change to this port (I think no...)?

Only by increasing the revision of all perl modules.

comment:57 Changed 11 years ago by vinc17@…

Otherwise, perhaps a script could be provided to force-remove all installed perl modules and rebuild them (with the drawback that one can't revert to the previous version/revision in case of problem).

comment:58 in reply to:  57 ; Changed 11 years ago by danielluke (Daniel J. Luke)

Note that it's pretty easy to do this yourself even if there's not a script provided.

I've been doing something like the following since back in the darwinports days:

$ port installed | grep p5 | cut -f 3 -d " " > perl_ports.txt
$ foreach i (`cat perl_ports.txt`)
foreach -> sudo port -d -v -f uninstall $i
foreach -> sudo port -d -v -f clean --archive $i
foreach -> end

...

$ foreach i (`cat perl_ports.txt`)
foreach -> sudo port -d -v install $i
foreach -> end

comment:59 in reply to:  58 ; Changed 11 years ago by danielluke (Daniel J. Luke)

WikiFormatting ...

Replying to dluke@…:

Note that it's pretty easy to do this yourself even if there's not a script provided.

I've been doing something like the following since back in the darwinports days:

$ port installed | grep p5 | cut -f 3 -d " " > perl_ports.txt
$ foreach i (`cat perl_ports.txt`)
foreach -> sudo port -d -v -f uninstall $i
foreach -> sudo port -d -v -f clean --archive $i
foreach -> end
 
...
 
$ foreach i (`cat perl_ports.txt`)
foreach -> sudo port -d -v install $i
foreach -> end

comment:60 in reply to:  53 Changed 11 years ago by jmroot (Joshua Root)

Replying to ricci@…:

For the 'default-perl-5.10.diff' patch added, I don't like the idea of having perl5.10 search perl5.8.x module paths - especially for those that are compiled - I'd fully expect them to break. Do we have a way to make all perl modules rebuild on a change to this port (I think no...)?

You'll notice that the patch deliberately doesn't include the 5.8.*/${os.platform}*-2level paths, which I believe is where all the C modules go? Theoretically, pure perl modules should just work (and I haven't noticed any failures so far). So everything compiled would need a rev bump, but not the rest.

comment:61 Changed 11 years ago by takashi@…

Cc: takashi@… added

Cc Me!

Changed 11 years ago by jmroot (Joshua Root)

Attachment: default-perl-5.10.diff added

updated patch

comment:62 Changed 11 years ago by jpo@…

Cc: jpo@… added

Cc Me!

comment:63 Changed 11 years ago by jabronson@…

Cc: jabronson@… added

Cc Me!

comment:64 in reply to:  59 ; Changed 11 years ago by skaimauve@…

There is a problem with the uninstall/clean/install script above, as it uninstall all php5* ports.

And if the loop does not quite work for you can try:

$port installed | grep p5 | grep -v php5 |  cut -f 3 -d " " > perl_ports.txt
$cat perl_ports.txt | xargs sudo port -d -v -f uninstall
$cat perl_ports.txt | xargs sudo port -d -v -f clean --archive
$cat perl_ports.txt | xargs sudo port -d -v install

comment:65 in reply to:  64 Changed 11 years ago by ryandesign (Ryan Schmidt)

Replying to skaimauve@…:

There is a problem with the uninstall/clean/install script above, as it uninstall all php5* ports.

Oops! :)

port installed | grep p5 | grep -v php5 | cut -f 3 -d " " > perl_ports.txt

Or better yet:

port installed name:^p5- | cut -f 3 -d " " > perl_ports.txt

comment:66 Changed 11 years ago by ematiu@…

Cc: ematiu@… added

Cc Me!

Changed 11 years ago by ematiu@…

mod_perl patch for perl5.10

comment:67 Changed 11 years ago by ematiu@…

Attached is a small patch for building mod_perl2 with perl5.10 as the default perl version.

comment:68 Changed 11 years ago by mjg@…

Cc: mjg@… added

Cc Me!

comment:69 Changed 10 years ago by Markus.Ueberall@…

Cc: Markus.Ueberall@… added

Cc Me!

comment:70 Changed 10 years ago by reg-macports.org@…

I'd like to note that Snow Leopard comes with perl 5.10:

$ /usr/bin/perl --version

This is perl, v5.10.0 built for darwin-thread-multi-2level
(with 2 registered patches, see perl -V for more detail)

It seems odd that MacPorts by default installs an older perl than the one that comes with the operating system.

comment:71 Changed 10 years ago by vinc17@…

Especially now since 5.10.1 is in the maint branch.

comment:72 Changed 10 years ago by tomas.znamenacek@…

Cc: tomas.znamenacek@… added

Cc Me!

Changed 10 years ago by ghosthound

Attachment: perl5.Portfile.diff added

patch for perl5 Portfile to clean it up, default to perl5.8, variant perl5_10 for perl5.10

comment:73 Changed 10 years ago by ghosthound

Committed attachment 'perl5.Portfile.diff' in r62843.

comment:74 Changed 10 years ago by steve@…

Cc: steve@… added

Cc Me!

comment:75 Changed 10 years ago by sorin.sbarnea@…

Cc: sorin.sbarnea@… added

Cc Me!

comment:76 Changed 10 years ago by sorin.sbarnea@…

Installing an older perl release that does not support multi-threading is a serious issue on 10.6.

comment:77 in reply to:  76 Changed 10 years ago by ghosthound

Replying to sorin.sbarnea@…:

Installing an older perl release that does not support multi-threading is a serious issue on 10.6.

That's a pretty vague and unhelpful comment. You could equally say that walking across the street is a serious issue (after all, there are multi-thousand pound mechanical devices in the street, moving faster than you can run!). If you've got particular reasons to think the above, please indicate what they are, and if you really want to do it well, also indicate what tradeoffs are involved.

In the meantime, you can install:

perl5.10 +threads

perl5 +perl5_10

and you should have what you appear to want.

If you really want to be helpful, you can help determine the best way to flip the perl5 port to default to installing perl5.10 *and* make sure that all the ports that are already installed are either upgraded or continue to work.

comment:78 Changed 9 years ago by ghosthound

Resolution: fixed
Status: assignedclosed

resolved in r76485

comment:79 Changed 6 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

Note: See TracTickets for help on using tickets.