From d972ebf203c2aa0cc31bb90b3f40b880e491c90c Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Wed, 30 Jul 2008 16:55:14 +0000 Subject: [PATCH] tentative cleanup - get rid of default distro/release as this is broken on centos --- build.common | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/build.common b/build.common index c7144d75..1d149273 100644 --- a/build.common +++ b/build.common @@ -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 -- 2.43.0