perl5.8 fixup

Bradley Giesbrecht brad at pixilla.com
Tue Mar 3 20:21:10 PST 2009


On Mar 3, 2009, at 4:22 PM, Bradley Giesbrecht wrote:

> Situation: I removed macports and reinstalled using the macports  
> wiki recommended methods.
> I installed perl5.8 and only perl5.8 using all variants.
> I looked for and found a p5 that thought would not activate without  
> using -f.
> Seeing as threads along these lines are current I'm going to assume  
> the readers of this message know something about what I'm talking  
> about.
>
> Profession: I believe there is a problem with some port p5 modules  
> that conflict with perl5.8 installed modules.
>
> Acknowledgments: I don't beleive I'm qualified to offer a solution  
> for the p5 conflicts with perl5.8.
>
> Problems: Without the user adding another env var it appears the  
> port perl5.8 modules may not be found. Some port p5 modules seem to  
> collide with port pelr5.8 installed modules.
>
> Goal: Build consensus that there is a problem with port perl5.8 base  
> modules not being available without adding another env var. Build  
> consensus that some port p5 modules collide with port perl5.8 base  
> modules. Move toward a solution.
>
> My comments:
> Listening to Vincent Lefèvre, who must know more then me about perl,  
> I added PERL5LIB to my env and I think this is good way to go.
>
> I am going to suggest we add a port "macports-env" for setting  
> macports env shell vars that are necessary for port and other  
> software to run.
> If a port installs files that should be in env PATH then the  
> Portfile could have a var like "macports-path /opt/local/bin/ 
> somepath" and this path would be added to the macports-env config  
> file at /opt/local/etc/macports/env.conf. I think some kind of a  
> structure like ini might be nice for this file so items can be  
> removed when a port is deactivated.
>
> Ok, that's my idea for env.
>
> Now for the perl5.8 p5 collisions. I have written three short  
> scripts to try to find where the problems are. They are not pretty  
> and probably not all that useful. I am going to add them here so  
> people smarter then me can comment. Not being that familiar with  
> perl and it's modules I will need to spend some time trying to match  
> port perl5.8 module names with port p5 module names. Maybe some  
> others can try these scripts and notice some obvious p5 ports that  
> are not needed. I think some were added because without a proper  
> PERL5LIB env other ports that were being submitted wouldn't run.
>
> If I'm way off on my presumptions I'll probably just give in to -f  
> but if I'm not and others are interested in fixing this I want to  
> help.
>
> BlackBook: root# cat *.sh
> #!/bin/sh
> # file name: porl5.8_installed_modules.sh
> # purpose: remove port p5 modules that are installed as part of  
> perl5.8 base
>
> startdir=`pwd`
> p5dir=/opt/local/lib/perl5/5.8.9
>
> cd $p5dir
>
> for p5_perl in $( ls *.pm | sed 's|.pm||g' ); do
> 		echo "${p5_perl}"
> 		if [ -d $p5_perl ]; then
> 			cd $p5_perl
> 			for p5_perl_file in $( ls *.pm | sed 's|.pm||g' ); do
> 				echo "${p5_perl},${p5_perl_file}"
> 			done
> 			cd $p5dir
> 		fi
> done
>
> cd $startdir
>
> # file name: porl5.8_installed_modules.sh
>
> #!/bin/sh
> # file name: port_p5_module_deps.sh
> # purpose: remove port p5 modules that are installed as part of  
> perl5.8 base
>
> for p5_ports in $( ls /opt/local/var/macports/sources/ 
> rsync.macports.org/release/ports/perl ); do
> 	for p5_deps in $( port deps $p5_ports | tail +2 ); do
> 		echo "${p5_ports},${p5_deps}"
> 	done
> done
>
> # file name: port_p5_module_deps.sh
>
> #!/bin/sh
> # file name: port_p5_modules.sh
> # purpose: remove port p5 modules that are installed as part of  
> perl5.8 base
>
> startdir=`pwd`
> p5dir=/opt/local/var/macports/sources/rsync.macports.org/release/ 
> ports/perl
>
> cd $p5dir
>
> for p5_perl in $( ls | sed 's|p5-||g' | sed 's|-|,|g' ); do
> 	echo "${p5_perl}"
> done
>
> cd $startdir
>
> # file name: port_p5_modules.sh

These p5 ports appear to be perl5.8 base modules as well. There may be  
more, this is just a first stab.

port info p5-cgi
port info p5-digest
port info p5-next
port info p5-test-harness
port info p5-test-simple
port install p5-cgi
port install p5-digest
port install p5-next
port install p5-test-harness
port install p5-test-simple
port uninstall p5-cgi
port uninstall p5-digest
port uninstall p5-next
port uninstall p5-test-harness
port uninstall p5-test-simple

These ports appear to depend on the above ports.
p5-calendar-simple
p5-curses-ui
p5-dbix-class
p5-gearman-client-async
p5-html-scrubber
p5-log-dispatch
p5-mac-errors
p5-math-bigint
p5-moose
p5-net
p5-return-value
p5-test-exception
p5-test-longstring
p5-test-memory-cycle
p5-test-object
p5-test-pod
p5-test-pod-coverage
p5-test-www-mechanize
p5-text-wikiformat

//Brad


More information about the macports-dev mailing list