Opened 7 years ago

Last modified 2 years ago

#29763 new enhancement

*_select framework does not apply to Perl: fix provided

Reported by: mywolfson@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), pixilla (Bradley Giesbrecht), ryandesign (Ryan Schmidt), larryv (Lawrence Velázquez), nonstop.server@…, raimue (Rainer Müller), anddam (Andrea D'Amore), cooljeanius (Eric Gallager), macports@…, geekosaur, nerdling (Jeremy Lavergne), 0xced (Cédric Luthi), pmq@…, rmstonecipher@…, dbevans (David B. Evans), jjstickel@…, jeremyhu (Jeremy Huddleston Sequoia), ecronin (Eric Cronin), cfaerber@…, quantum7@…, xeron (Ivan Larionov), marc@…, decibel (Jim Nasby), mmpestorich (Mike M Pestorich), mojca (Mojca Miklavec), Martin.vGagern@…, mdeaudelin (Mathieu Deaudelin-Lemay)
Port: perl5 perl5.14 perl5.16 perl5.12 perl5.8 perl5.10 perl_select perl5.18

Description

Currently, there's no perl_select port to make port select work with Perl. Since port select is a great system, I updated the perl* ports to install filelists into the etc/select/perl tree, and also added a perl_select port, to add the essential files to make Perl version selection function.

These files are not perfect, and I haven't tested them with Perl versions other than 5.12. They also do not include the manual pages. If there is interest in that, I can take time to do it.

I have posted the ports to my githubhttps://github.com/myw/my.ports. Please contact me for incorporation into MacPorts or improvement/testing before such incorporation. Thanks!

Change History (46)

comment:1 Changed 7 years ago by mywolfson@…

  • Cc mywolfson@… added

Cc Me!

comment:2 Changed 7 years ago by mf2k (Frank Schima)

  • Cc mcalhoun@… added; mywolfson@… removed
  • Keywords perl perl5 perl5.12 perl5.8 perl5.10 perl_select select removed
  • Owner changed from macports-tickets@… to ricci@…
  • Priority changed from High to Normal
  • Type changed from submission to enhancement
  • Version 1.9.2 deleted

comment:3 Changed 7 years ago by pixilla (Bradley Giesbrecht)

  • Cc pixilla@… added

Cc Me!

comment:4 follow-up: Changed 7 years ago by jmroot (Joshua Root)

This is a nice idea, but unfortunately it doesn't work with the p5-* ports the way they are. The perl5 port creates links similar to the ones that perl_select would, but then the p5 ports use those links to choose which version of perl to build against. So if you have p5-foo built against perl5.10 and then change the links to perl5.12, the modules will not be available when you run 'perl', and trying to install modules that depend on previously installed ones will fail.

Hopefully the ability to define subports in the upcoming base release will mean it's no longer a huge pain to maintain p5.8-foo, p5.10-foo and p5.12-foo, and we'll be able to clean up this mess.

comment:5 follow-up: Changed 7 years ago by mywolfson@…

Thanks for the clarification. This makes sense.

Is it then somehow possible to hack the perl5 port to allow it to "turn off" MacPorts Perl? That's the main impetus behind my hacking anyway: constantly activating and deactivating both perl5 and perl5.12 is a pain. Maybe there's no way around this?

comment:6 in reply to: ↑ 5 Changed 7 years ago by danielluke (Daniel J. Luke)

Replying to mywolfson@…:

Is it then somehow possible to hack the perl5 port to allow it to "turn off" MacPorts Perl? That's the main impetus behind my hacking anyway: constantly activating and deactivating both perl5 and perl5.12 is a pain. Maybe there's no way around this?

What are you trying to do where you need to activate/deactivate MacPorts perl all the time?

comment:7 Changed 7 years ago by mywolfson@…

I use a program-output-prettifier called Cope, which installs wrapper scripts around standard binaries in its own location, and puts that location at the front of the path. Cope uses the default Perl binary, so when the MacPorts perl is selected, everything crashes, because it can't find the libraries. So I can't do ls, I have to specify /bin/ls, etc. This can be a pain.

But in general, I think it's just best if MacPorts-based things are the only things that use the MacPorts Perl: everything outside the MacPorts world should use the true MacOS X Perl. And that's the larger problem I was trying to get at with the perl_select stuff.

comment:8 follow-up: Changed 7 years ago by danielluke (Daniel J. Luke)

Why don't you just put your MacPorts prefix at the end of your $PATH?

Or, fix Cope to just a fixed path to the correct perl? (which it looks like you may have just done?)

comment:9 in reply to: ↑ 8 Changed 7 years ago by mywolfson@…

Replying to dluke@…:

Or, fix Cope to just a fixed path to the correct perl? (which it looks like you may have just done?)

Indeed, I did. That fixes the local problem, if not the global one. Also, the global one may just not have a good solution.

In any case, thanks for the replies. The discussion has been illuminating.

comment:10 in reply to: ↑ 4 Changed 5 years ago by ryandesign (Ryan Schmidt)

Replying to jmr@…:

Hopefully the ability to define subports in the upcoming base release will mean it's no longer a huge pain to maintain p5.8-foo, p5.10-foo and p5.12-foo, and we'll be able to clean up this mess.

Some time has passed, and subports now solve this part of the problem. Are there any remaining reasons why we should not remove the perl5 port and add the perl_select port as suggested? We would of course need to find all ports depending on the perl5 port and change them to depend on a specific perl port.

comment:11 Changed 5 years ago by ryandesign (Ryan Schmidt)

  • Cc ryandesign@… added

Cc Me!

comment:12 Changed 5 years ago by mf2k (Frank Schima)

  • Port changed from perl5, perl5.12, perl5.8, perl5.10, perl_select to perl5 perl5.12 perl5.8 perl5.10 perl_select

comment:13 Changed 5 years ago by larryv (Lawrence Velázquez)

  • Cc larryv@… added

Cc Me!

comment:14 Changed 5 years ago by nonstop.server@…

  • Cc nonstop.server@… added

Cc Me!

comment:15 Changed 5 years ago by raimue (Rainer Müller)

  • Cc raimue@… added

Cc Me!

comment:16 Changed 5 years ago by raimue (Rainer Müller)

  • Port perl5.14 perl5.16 added

comment:17 Changed 5 years ago by cooljeanius (Eric Gallager)

  • Cc egall@… added

Cc Me!

comment:18 Changed 5 years ago by cooljeanius (Eric Gallager)

  • Cc egall@… removed

Cc Me!

comment:19 Changed 5 years ago by anddam (Andrea D'Amore)

  • Cc and.damore@… added

Cc Me!

comment:20 Changed 5 years ago by cooljeanius (Eric Gallager)

  • Cc egall@… added

Cc Me!

comment:21 Changed 4 years ago by macports@…

  • Cc macports@… added

Cc Me!

comment:22 Changed 4 years ago by geekosaur

  • Cc allbery.b@… added

Cc Me!

comment:23 Changed 4 years ago by nerdling (Jeremy Lavergne)

  • Cc snc@… added

Cc Me!

comment:24 Changed 4 years ago by nerdling (Jeremy Lavergne)

basic perl_select committed in r112794 and r112795.

comment:25 Changed 4 years ago by nerdling (Jeremy Lavergne)

  • Port perl5.18 added

comment:26 Changed 4 years ago by nerdling (Jeremy Lavergne)

  • Cc cedric.luthi@… added

r112798 upx

r112801 libmemcached

r112802 eboard pioneers

r112803 gstreamer010 gstreamer1 gtk-doc libgnomecups oaf

r112804 fig2ps pgplot

r112805 hexchat

r112806 llvm-2.9 llvm-3.0 llvm-3.1 llvm-3.2 llvm-3.3 llvm-3.4

r112807 exim

r112808 tablet-encode

Last edited 4 years ago by nerdling (Jeremy Lavergne) (previous) (diff)

comment:27 Changed 4 years ago by nerdling (Jeremy Lavergne)

  • Cc pmq@… added

comment:28 Changed 4 years ago by nerdling (Jeremy Lavergne)

  • Cc rmstonecipher@… devans@… added

comment:29 Changed 4 years ago by nerdling (Jeremy Lavergne)

  • Cc jjstickel@… added

comment:30 Changed 4 years ago by nerdling (Jeremy Lavergne)

  • Cc jeremyhu@… added

comment:31 Changed 4 years ago by nerdling (Jeremy Lavergne)

  • Cc ecronin@… added

comment:32 Changed 4 years ago by nerdling (Jeremy Lavergne)

Reverted everything in r112809 and r112812.

comment:33 Changed 4 years ago by ghosthound

  • Owner changed from ricci@… to macports-tickets@…

No longer maintainer

comment:34 Changed 4 years ago by ryandesign (Ryan Schmidt)

  • Owner changed from macports-tickets@… to macports-tickets@…

comment:35 Changed 4 years ago by cfaerber@…

  • Cc cfaerber@… added

Cc Me!

comment:36 Changed 4 years ago by quantum7@…

  • Cc quantum7@… added

Cc Me!

comment:37 in reply to: ↑ description ; follow-up: Changed 4 years ago by quantum7@…

What's the status of perl_select now? It is available in macports 2.2.1, but doesn't behave like I'd expect. On my machine I can install it, but only the default apple installations show up with port select, not the macports versions:

$ port select --list perl
Available versions for perl:
	none
	perl5.12-apple.13
	perl5.16-apple.13 (active)

I have several macports version installed:

lrwxr-xr-x  1 root  admin    17B Feb 21 12:31 /opt/local/bin/perl -> /usr/bin/perl5.16
lrwxr-xr-x  1 root  admin     8B Nov 18 22:47 /opt/local/bin/perl5 -> perl5.12
-rwxr-xr-x  1 root  admin    14K Dec  2 06:04 /opt/local/bin/perl5.12
lrwxr-xr-x  1 root  admin     8B Dec  2 06:04 /opt/local/bin/perl5.12.4 -> perl5.12
-rwxr-xr-x  1 root  admin    14K Nov 20 05:45 /opt/local/bin/perl5.16
lrwxr-xr-x  1 root  admin     8B Nov 20 05:45 /opt/local/bin/perl5.16.1 -> perl5

Is this a bug, or am I missing a configuration step?

comment:38 in reply to: ↑ 37 Changed 4 years ago by ryandesign (Ryan Schmidt)

You're not missing anything. It doesn't work yet. That's why this ticket is still open.

comment:39 Changed 4 years ago by xeron (Ivan Larionov)

  • Cc xeron.oskom@… added

Cc Me!

comment:40 Changed 3 years ago by marc@…

  • Cc marc@… added

Cc Me!

comment:41 in reply to: ↑ description ; follow-up: Changed 3 years ago by decibel (Jim Nasby)

CC

comment:42 in reply to: ↑ 41 Changed 3 years ago by larryv (Lawrence Velázquez)

  • Cc decibel@… added

You need to actually click the “Cc” button to be Cc’d.

comment:43 Changed 3 years ago by mmpestorich (Mike M Pestorich)

  • Cc mmpestorich@… added

Cc Me!

comment:44 Changed 3 years ago by mojca (Mojca Miklavec)

  • Cc mojca@… added

Cc Me!

comment:45 Changed 3 years ago by Martin.vGagern@…

  • Cc Martin.vGagern@… added

Cc Me!

comment:46 Changed 2 years ago by mdeaudelin (Mathieu Deaudelin-Lemay)

  • Cc mdeaudelin@… added

Cc Me!

Note: See TracTickets for help on using tickets.