tentative cleanup - get rid of default distro/release as this is broken on centos
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 30 Jul 2008 16:55:14 +0000 (16:55 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 30 Jul 2008 16:55:14 +0000 (16:55 +0000)
build.common

index c7144d7..1d14927 100644 (file)
@@ -9,50 +9,31 @@
 # $Id$
 #
 
-### xxx thierry : looks like we should bump this to fedora 8
-### however, rather than the actual default,
-### this looks more like the bottom of what we're able to build
-### so I leave it with fc4
-function pl_getDefaultDistro() {
-    # FC4 is currently the default release
-    echo "Fedora"
-    return 0
-}
-
-function pl_getDefaultRelease() {
-    # FC4 is currently the default release
-    echo "4"
-    return 0
-}
+# support for fedora and centos only for now
 
 function pl_getDistro() {
-    defaultDistro=$(pl_getDefaultDistro)
     if [ -f "/etc/redhat-release" ] ; then
        distro=$(awk ' { print $1 } ' /etc/redhat-release)
     else
-       distro=$defaultDistro
+       echo "build.common.pl_getDistro-unknown"
+       exit 1
     fi
     echo "$distro"
     return 0
 }
 
-### xxx thierry : when running in a centOS box, this issues a warning message
-### because 5.2 is not an integer and bash cannot compare that
-### seems harmless though
 function pl_getRelease() {
-    defaultRelease=$(pl_getDefaultRelease)
     if [ -f "/etc/redhat-release" ] ; then
        release=$(awk ' { if ($1=="Fedora" && $2=="Core") print $4 ; if (($1=="Fedora" && $2!="Core")||$1=="CentOS") print $3 } ' /etc/redhat-release)
-       [ $release -lt $defaultRelease ] && release=$defaultRelease
     else
-       release=$defaultRelease
+       echo "build.common.pl_getRelease-unknown"
+       exit 1
     fi
     echo "$release"
     return 0
 }
 
 # vserver expects something like fc4 or f7
-# for fedora and centos only for now
 function pl_getReleaseName () {
     distro=$1; shift
     release=$1; shift