From: Dodji Seketeli Date: Mon, 12 Sep 2016 10:09:59 +0000 (+0200) Subject: Better handle fedabipkgdiff dependencies detection X-Git-Tag: libabigail-1.0.rc6~32 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ce293c2d436df8da7b73d98330f75454981ff15c;p=platform%2Fupstream%2Flibabigail.git Better handle fedabipkgdiff dependencies detection Even when the configure script is executed without the --enable-fedabipkgdiff switch, if one of the dependencies of fedabipkgdiff is missing (e.g, python), it fails with a fatal error. It should rather just disable fedabipkgdiff in that case. This patch fixes this behaviour. It makes it so that it's only when the --enable-fedabipkgdiff switch provided that a missing dependency results in a fatal hard error. * configure.ac: It's only when --enable-fedabipkgdiff is provided that a missing dependency of the fedabipkgdiff program results in a fatal error. Otherwise, building fedabipkgdiff is just disabled. Signed-off-by: Dodji Seketeli --- diff --git a/configure.ac b/configure.ac index eb9caebc..fdfcbf69 100644 --- a/configure.ac +++ b/configure.ac @@ -296,14 +296,22 @@ else fi if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then + MISSING_FEDABIPKGDIFF_DEP=no + if test x$ENABLE_FEDABIPKGDIFF = xyes; then - FATAL=yes + MISSING_FEDABIPKGDIFF_DEP_FATAL=yes + else + MISSING_FEDABIPKGDIFF_DEP_FATAL=no fi AC_PATH_PROG(WGET, wget, no) - if test x$WGET = x$no; then - AC_MSG_ERROR(could not find the wget program) + if test x$WGET = xno; then + if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then + AC_MSG_ERROR(could not find the wget program) + else + MISSING_FEDABIPKGDIFF_DEP=yes + fi fi # The minimal python version we want to support is 2.6.6 because EL6 @@ -316,25 +324,35 @@ if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then [MINIMAL_PYTHON_VERSION_FOUND=no]) if test x$MINIMAL_PYTHON_VERSION_FOUND = xno; then - AC_MSG_ERROR([could not find a python program of version at least $MINIMAL_PYTHON_VERSION]) + MISSING_FEDABIPKGDIFF_DEP=yes + if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then + AC_MSG_ERROR([could not find a python program of version at least $MINIMAL_PYTHON_VERSION]) + fi fi REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF="\ argparse logging os re subprocess sys urlparse \ xdg koji mock rpm imp tempfile" - if test -x$ENABLE_FEDABIPKGDIFF != xno; then + if test x$ENABLE_FEDABIPKGDIFF != xno; then AX_CHECK_PYTHON_MODULES([$REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF], [python2], [FOUND_ALL_PYTHON_MODULES=yes], [FOUND_ALL_PYTHON_MODULES=no]) if test x$FOUND_ALL_PYTHON_MODULES = xno; then - AC_MSG_NOTICE([missing python modules: $MISSING_PYTHON_MODULES]) - AC_MSG_NOTICE([disabling fedabipkgdiff as a result]) + MISSING_FEDABIPKGDIFF_DEP=yes + if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then + AC_MSG_ERROR([missing python modules: $MISSING_PYTHON_MODULES]); + else + AC_MSG_NOTICE([missing python modules: $MISSING_PYTHON_MODULES]) + AC_MSG_NOTICE([disabling fedabipkgdiff as a result]) + fi ENABLE_FEDABIPKGDIFF=no else - ENABLE_FEDABIPKGDIFF=yes + if test x$MISSING_FEDABIPKGDIFF_DEP = xno; then + ENABLE_FEDABIPKGDIFF=yes + fi fi fi fi