Update of /cvsroot/fink/fink/perlmod/Fink In directory sc8-pr-cvs17:/tmp/cvs-serv17336
Modified Files: Tag: branch_0_27 ChangeLog Services.pm Log Message: fall back to checking the gcc symlink if gcc_select is not there (backport from HEAD) Index: Services.pm =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/Services.pm,v retrieving revision 1.214 retrieving revision 1.214.6.1 diff -u -d -r1.214 -r1.214.6.1 --- Services.pm 11 Jan 2007 03:17:48 -0000 1.214 +++ Services.pm 12 Jun 2007 18:25:43 -0000 1.214.6.1 @@ -1280,9 +1280,16 @@ =cut sub gcc_selected { - return 0 unless -x '/usr/sbin/gcc_select'; - chomp(my $gcc_select = `/usr/sbin/gcc_select 2>&1`); - return $gcc_select if $gcc_select =~ s/^.*gcc version (\S+)\s+.*$/$1/gs; + if (-x '/usr/sbin/gcc_select') { + chomp(my $gcc_select = `/usr/sbin/gcc_select 2>&1`); + return $gcc_select if $gcc_select =~ s/^.*gcc version (\S+)\s+.*$/$1/gs; + } + if (-l '/usr/bin/gcc') { + my $link = readlink('/usr/bin/gcc'); + if ($link =~ /gcc-(\d+\.\d+)/) { + return $1; + } + } return 0; } Index: ChangeLog =================================================================== RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v retrieving revision 1.1441.2.7 retrieving revision 1.1441.2.8 diff -u -d -r1.1441.2.7 -r1.1441.2.8 --- ChangeLog 10 Jun 2007 05:59:28 -0000 1.1441.2.7 +++ ChangeLog 12 Jun 2007 18:25:43 -0000 1.1441.2.8 @@ -1,3 +1,9 @@ +2007-06-12 Dave Morrison <[EMAIL PROTECTED]> + + * Services.pm: fall back to checking the gcc symlink if + gcc_select is not there (backport from HEAD, change made by + rangerrick on 2007-06-11) + 2007-06-09 Dave Morrison <[EMAIL PROTECTED]> * Validation.pm: Warn if .info has "SplitOff1" instead of "SplitOff" ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits