Added tests for genkernel >3.2.0
authorEric Edgar <rocket@gentoo.org>
Wed, 6 Apr 2005 02:44:37 +0000 (02:44 +0000)
committerEric Edgar <rocket@gentoo.org>
Wed, 6 Apr 2005 02:44:37 +0000 (02:44 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@583 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/support/chroot-functions.sh
targets/support/kmerge.sh

index ae84283186b1995316fa383076f8f4fadbacc42c..92c1c312ea28b25a30e5a16a20fbf221fbe8490f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,10 @@
 # ChangeLog for gentoo/src/catalyst 
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.205 2005/04/05 21:52:51 rocket Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.206 2005/04/06 02:44:37 rocket Exp $
+
+  06 Apr 2005; Eric Edgar <rocket@gentoo.org>
+  targets/support/chroot-functions.sh, targets/support/kmerge.sh:
+  Added tests for genkernel >3.2.0
 
   05 Apr 2005; Eric Edgar <rocket@gentoo.org> catalyst:
   Fixed email address
index b6ab09b24207925af2aadee38e36964d3a11c0c1..b197688a078dffb8dd507c9bce41f505ebe40556 100755 (executable)
@@ -9,17 +9,22 @@ check_portage_version(){
        fi
 }
 
-#check_genkernel_version(){
-#      genkernel_version=`/usr/lib/portage/bin/portageq best_version / sys-kernel/genkernel \
-#              | cut -d/ -f2 | cut -d- -f2,3`
-#      if [ -n ${genkernel_version} -a `echo ${genkernel_version} | cut -d- -f1 | cut -d. -f3` -lt '3' ]
-#      then
-#              echo "ERROR: Your genkernel version is too low in your seed stage.  genkernel version"
-#              echo "XXXXXXXXXXXXXXX or greater is required."
-#              exit 1
-#      fi
-#}
-
+check_genkernel_version(){
+    genkernel_version=$(genkernel --version)
+    genkernel_version_major=${genkernel_version%%.*}
+    genkernel_version_minor_sub=${genkernel_version#${genkernel_version_major}.}
+    genkernel_version_minor=${genkernel_version_minor_sub%%.*}
+    genkernel_version_sub=${genkernel_version##*.}
+    if [ -n "${genkernel_version}" -a "${genkernel_version_major}" -eq '3' -a "${genkernel_version_minor}" -ge '2' ]
+    then
+           echo "Genkernel version ${genkernel_version} found ... continuing"
+    else
+           echo "ERROR: Your genkernel version is too low in your seed stage.  genkernel version 3.2.0"
+           echo "or greater is required."
+           exit 1
+    fi
+}
+               
 setup_myfeatures(){
 
        if [ -n "${clst_CCACHE}" ]
index 07feef0ce829a3112f1562abfb1160b64f9e9bbe..07975f94742134bb389ef9d55712f1571d4db45d 100755 (executable)
@@ -4,6 +4,8 @@
 
 source /tmp/chroot-functions.sh
 
+check_genkernel_version
+
 PKGDIR=/usr/portage/packages/gk_binaries/${clst_kname}/ebuilds
 
 setup_gk_args() {