FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 04-25-2008, 07:05 AM
 
Default Cluster Project branch, STABLE2, updated. cluster-2.03.01-14-g523acee

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=523acee2a3 aa7340acc04a28e43164f090b615df

The branch, STABLE2 has been updated
via 523acee2a3aa7340acc04a28e43164f090b615df (commit)
from c58f0a46f6b06b0cf0b09dad2c3114fe5742a489 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 523acee2a3aa7340acc04a28e43164f090b615df
Author: Fabio M. Di Nitto <fdinitto@redhat.com>
Date: Fri Apr 25 09:01:14 2008 +0200

[BUILD] Fix kernel check for good

Use the top level Makefile of the source tree rather than
random includes that keeps changing.

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>

-----------------------------------------------------------------------

Summary of changes:
configure | 55 +++++++++++++++++--------------------------------------
1 files changed, 17 insertions(+), 38 deletions(-)

diff --git a/configure b/configure
index 2501059..9160e10 100755
--- a/configure
+++ b/configure
@@ -236,64 +236,43 @@ if ($help || !$err) {
}

sub kernel_version {
- my $autoconf_path = shift;
+ my $makefile_path = shift;
my $required_version = shift;
- my $build_version = 0;
- my $build_patchlevel = 0;
- my $build_sublevel = 0;

print "
Checking kernel:
";

# add autoconf to the path
- $autoconf_path .= '/include/linux/autoconf.h';
+ $makefile_path .= '/Makefile';
my @version = split /./, $required_version;
- my $current_version = 0;
- if ( -f $autoconf_path ) {
- # open the autoconf.h to feth VERSION, PATCHLEVEL and SUBLEVEL, if needed I can add EXTRAVERSION too
- open AUTOCONF, '<', $autoconf_path;
- while (<AUTOCONF>) {
- if ($_ =~ /CONFIG_KERNELVERSION/) {
- $current_version = $_;
- # we don't need to check any thing else in this file so we are stopping the read
- last;
- }
+ if ( -f $makefile_path ) {
+ # open the toplevel Makefile to feth VERSION, PATCHLEVEL and SUBLEVEL
+ open MAKEFILE, '<', $makefile_path;
+ while (<MAKEFILE>) {
+ $build_version = $1 if /^VERSION = (d+)/;
+ $build_patchlevel = $1 if /^PATCHLEVEL = (d+)/;
+ $build_sublevel = $1 if /^SUBLEVEL = (d+)/;
+ last if (defined $build_version && defined $build_patchlevel && defined $build_sublevel);
}
- close AUTOCONF;
- # Warn and continue if CONFIG_KERNELVERSION was not found
- if (!$current_version) {
+ close MAKEFILE;
+ # Warn and continue if kernel version was not found
+ if (!$build_version || !$build_patchlevel || !$build_sublevel) {
print " WARNING: Could not determine kernel version.
";
+ print " Build might fail!
";
return 1;
}
- # leaving only the numbers from the lines
- # this is faster then split and doesn't alocate useless arrays
- $current_version =~ s/.*"(.*)"
/$1/;
- # parse the kernel version into the variables
- if ($current_version =~ /-/) {
- my @line = split /-/, $current_version;
- my @ver = split /./, $line[0];
- $build_version = $ver[0];
- $build_patchlevel = $ver[1];
- $build_sublevel = $ver[2];
- } else {
- my @kernel = split /./, $current_version;
- $build_version = $kernel[0];
- $build_patchlevel = $kernel[1];
- $build_sublevel = $kernel[2];
- }
# checking VERSION, PATCHLEVEL and SUBLEVEL for the supplied kernel
- # if needed I can add also EXTRAVERSION to the check
if ($build_version >= $version[0] &&
$build_patchlevel >= $version[1] &&
$build_sublevel >= $version[2]) {
print " Current kernel version appears to be OK
";
return 1;
} else {
- print " Current kernel version: ",$current_version,"
Minimum kernel version: ",$required_version,"
";
+ print " Current kernel version: ",$build_version, "." , $build_patchlevel, ".", $build_sublevel, "
Minimum kernel version: ",$required_version,"
";
print " FAILED!
";
return 0;
}
} else {
- print " Unable to find ($autoconf_path)!
";
+ print " Unable to find ($makefile_path)!
";
print " Make sure that:
- the above path is correct
";
print " - your kernel is properly configured and prepared.
";
print " - kernel_build and kernel_src options to configure are set properly.
";
@@ -385,7 +364,7 @@ if (!$kernel_src) {
$kernel_src=$kernel_build;
}
}
-if (not $disable_kernel_check and !kernel_version($kernel_build,$required_kernelvers ion)) {
+if (not $disable_kernel_check and !kernel_version($kernel_src,$required_kernelversio n)) {
exit 1;
}
if (!$module_dir) {


hooks/post-receive
--
Cluster Project
 

Thread Tools




All times are GMT. The time now is 10:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org