The following is a patch to the perl build process. The question is,
does it go in before 5.3.1 so it's in 5.3.1, or after 5.3.1 but before
publishing to CPAN?
--
Wes Hardaker
Sparta, Inc.
Index: Makefile.subs.pl
===================================================================
RCS file: /cvsroot/net-snmp/net-snmp/perl/Makefile.subs.pl,v
retrieving revision 5.11
diff -u -p -r5.11 Makefile.subs.pl
--- Makefile.subs.pl 25 Jun 2006 15:43:59 -0000 5.11
+++ Makefile.subs.pl 30 Jun 2006 21:59:31 -0000
@@ -89,21 +89,43 @@ sub find_files {
sub Check_Version {
if (($Config{'osname'} ne 'MSWin32' || $ENV{'OSTYPE'} eq 'msys')) {
my $foundversion = 0;
+ return if ($ENV{'DONT_CHECK_VERSION'});
open(I,"<Makefile");
while (<I>) {
if (/^VERSION = (.*)/) {
my $perlver = $1;
my $srcver = $lib_version;
chomp($srcver);
+ my $srcfloat = floatize_version($srcver);
$perlver =~ s/pre/0./;
- if ($srcver ne $perlver) {
- die "ERROR: Net-SNMP installed version ($srcver) doesn't match this version ($perlver)\n";
+ if ($srcfloat ne $perlver) {
+ if (!$foundversion) {
+ print STDERR "ERROR:
+Net-SNMP installed version: $srcver => $srcfloat
+Perl Module Version: $perlver
+
+These versions must match for perfect support of the module. It is possible
+that different versions may work together, but it is strongly recommended
+that you make these two versions identical. You can get the Net-SNMP
+source code and the associated perl modules directly from
+
+ http://www.net-snmp.org/
+
+If you want to continue anyway please set the DONT_CHECK_VERSION environmental
+variable to 1 and re-run the Makefile.PL script.\n";
+ exit(1);
+ }
}
$foundversion = 1;
last;
}
}
- die "ERROR: Couldn't find version number of this module\n" if (!$foundversion);
+ die "ERROR: Couldn't find version number of this module\n";
close(I);
}
}
+
+sub floatize_version {
+ my ($major, $minor, $patch, $opps) = ($_[0] =~ /^(\d+)\.(\d+)\.?(\d*)\.?(\d*)/);
+ return $major + $minor/100 + $patch/10000 + $opps/100000;
+}
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders