[Ovirt-devel] [PATCH release] Add check for minimum version of Fedora for building

Perry Myers pmyers at redhat.com
Tue Dec 2 21:07:02 UTC 2008


Builds on F9 will not work, so we check to make sure that minimum
version if 10

Signed-off-by: Perry Myers <pmyers at redhat.com>
---
 ovirt.mk |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/ovirt.mk b/ovirt.mk
index b0f7977..ee99f5a 100644
--- a/ovirt.mk
+++ b/ovirt.mk
@@ -15,12 +15,19 @@ SUBDIRS ?= release server node node-image recipe docs appliance
 
 SUBDIR_SEP = ============================================================
 
+FEDORA = $(shell rpm --eval '%{fedora}')
+MIN_FEDORA = 10
+
 export OVIRT_CACHE_DIR ?= $(HOME)/ovirt-cache
 SRC_KS = $(OVIRT_CACHE_DIR)/src.ks
 F_REL = $(shell rpm -q --qf '%{VERSION}' fedora-release)
 BUILD_DIR := $(shell pwd)
 
 define subdir_gen_and_make
+    if [ "$(FEDORA)" -lt "$(MIN_FEDORA)" ]; then \
+        echo "Minimum version of Fedora to build with is $(MIN_FEDORA)." ; \
+        exit 1 ; \
+    fi ; \
     echo $(SUBDIR_SEP) $$dir; \
     (cd $$dir && test ! -f Makefile.in && test -f autogen.sh && ./autogen.sh) \
       || :; \
-- 
1.6.0.4




More information about the ovirt-devel mailing list