Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14000
Modified Files:
Services.pm PkgVersion.pm ChangeLog Bootstrap.pm
Log Message:
Overhauled enforce_gcc error message handling.
Index: PkgVersion.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/PkgVersion.pm,v
retrieving revision 1.380
retrieving revision 1.381
diff -u -d -r1.380 -r1.381
--- PkgVersion.pm 16 Apr 2005 22:09:15 -0000 1.380
+++ PkgVersion.pm 17 Apr 2005 15:15:00 -0000 1.381
@@ -1820,11 +1820,17 @@
if ($self->has_param("GCC")) {
my $gcc_abi = $self->param("GCC");
-Fink::Services::enforce_gcc("This package must be compiled with GCC
EXPECTED_GCC, but you currently have\n" .
-"GCC INSTALLED_GCC selected. To correct this problem, run the command:\n\n" .
-" sudo gcc_select GCC_SELECT_COMMAND\n\n" .
-"You may need to install a more recent version of the Developer Tools\n" .
-"(Apple's XCode) to be able to do so.\n", $gcc_abi);
+ my $name = $self->get_fullname();
+ Fink::Services::enforce_gcc(<<GCC_MSG, $gcc_abi);
+The package $name must be compiled with gcc EXPECTED_GCC,
+however, you currently have gcc INSTALLED_GCC selected. To correct
+this problem, run the command:
+
+ sudo gcc_select GCC_SELECT_COMMAND
+
+You may need to install a more recent version of the Developer Tools
+(Apple's XCode) to be able to do so.
+GCC_MSG
}
$bdir = $self->get_fullname();
Index: Bootstrap.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Bootstrap.pm,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -d -r1.94 -r1.95
--- Bootstrap.pm 9 Mar 2005 02:03:40 -0000 1.94
+++ Bootstrap.pm 17 Apr 2005 15:15:01 -0000 1.95
@@ -133,22 +133,28 @@
August 2003 Developer Tools update, or to Xcode, and try again.
END
-}
+ }
# We check to see if gcc is installed, and if it is the correct version.
# If so, we set $gcc so that 10.2 users will get the 10.2-gcc3.3 tree.
if (-x '/usr/bin/gcc') {
-$gcc = Fink::Services::enforce_gcc("Under CURRENT_SYSTEM, Fink must be
bootstrapped or updated using\n" .
-"gcc EXPECTED_GCC. However, you currently have gcc INSTALLED_GCC selected.\n"
.
-"To correct this problem, run the command:\n\n" .
- " sudo
gcc_select GCC_SELECT_COMMAND\n\n");
+ $gcc = Fink::Services::enforce_gcc(<<GCC_MSG);
+Under CURRENT_SYSTEM, Fink must be bootstrapped or updated with gcc
EXPECTED_GCC,
+however, you currently have gcc INSTALLED_GCC selected. To correct
+this problem, run the command:
+
+ sudo gcc_select GCC_SELECT_COMMAND
+
+You may need to install a more recent version of the Developer Tools
+(Apple's XCode) to be able to do so.
+GCC_MSG
$gcc = "-gcc" . $gcc;
-} else {
+ } else {
## 10.2 users who do not have gcc at all are installing binary only, so they
get
## to move to 10.2-gcc3.3 also
- $gcc = "-gcc3.3";
-}
+ $gcc = "-gcc3.3";
+ }
if ($host =~ /^powerpc-apple-darwin1\.[34]/) {
&print_breaking("\nThis system is no longer supported " .
Index: Services.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Services.pm,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- Services.pm 16 Apr 2005 16:14:58 -0000 1.156
+++ Services.pm 17 Apr 2005 15:15:00 -0000 1.157
@@ -1110,7 +1110,7 @@
Check to see if the gcc version optionally supplied in $gcc_abi is the
same as the default GCC ABI for the installed version of Mac OS X or Darwin.
-If it is not, we return the value for the deafult GCC ABI.
+If it is not, we return the value for the default GCC ABI.
If it is, or if $gcc_abi is not supplied, then we check to see if the
gcc version obtained from /usr/sbin/gcc_select agrees with the expected
@@ -1136,8 +1136,7 @@
sub enforce_gcc {
my $message = shift;
my $gcc_abi = shift;
- my ($gcc, $gcc_select, $gcc_command, $current_system);
- my ($dummy, $darwin_version);
+ my ($gcc, $gcc_select, $current_system);
# Note: we no longer support 10.1 or 10.2-gcc3.1 in fink, we don't
# specify default values for these.
@@ -1153,7 +1152,7 @@
$sw_vers =~ s/^(\d*\.\d*).*/$1/;
$gcc = $osx_default{$sw_vers};
} else {
- ($dummy,$dummy,$darwin_version) = uname();
+ my $darwin_version = (uname())[2];
$current_system = "Darwin $darwin_version";
$darwin_version =~ s/^(\d*).*/$1/;
$gcc = $darwin_default{$darwin_version};
@@ -1174,17 +1173,15 @@
$gcc_select = '(unknown version)';
}
- $gcc_command = $gcc_name{$gcc};
-
- $message =~ s/CURRENT_SYSTEM/$current_system/g;
- $message =~ s/INSTALLED_GCC/$gcc_select/g;
- $message =~ s/EXPECTED_GCC/$gcc/g;
- $message =~ s/GCC_SELECT_COMMAND/$gcc_command/g;
-
- ($gcc_select =~ /^$gcc/) or die($message);
+ if ($gcc_select !~ /^$gcc/) {
+ $message =~ s/CURRENT_SYSTEM/$current_system/g;
+ $message =~ s/INSTALLED_GCC/$gcc_select/g;
+ $message =~ s/EXPECTED_GCC/$gcc/g;
+ $message =~ s/GCC_SELECT_COMMAND/$gcc_name{$gcc}/g;
+ die $message;
+ }
return $gcc;
-
}
=item get_sw_vers
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.934
retrieving revision 1.935
diff -u -d -r1.934 -r1.935
--- ChangeLog 16 Apr 2005 22:09:15 -0000 1.934
+++ ChangeLog 17 Apr 2005 15:15:01 -0000 1.935
@@ -1,3 +1,8 @@
+2005-04-16 Daniel Macks <[EMAIL PROTECTED]>
+
+ * Bootstrap.pm, PkgVersion.pm, Services.pm: Overhauled enforce_gcc
+ error messages.
+
2005-04-16 Chris Zubrzycki <[EMAIL PROTECTED]>
* PkgVersion.pm: Allow passing of TERM to build env (colorgcc)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits