On some platforms, the koji client is so old that the koji object
doesn't have the .read_config method that we need.
Unfortunately, the koji client library module doesn't come with a
__version__ variable that carries its version number. So we cannot
use the version of the library. This patch thus tries to invoke the
koji.read_config method and see if it works. If it does, the koji
client is deemed recent enough. Otherwise the fedabipkgdiff feature
is disabled.
* configure.ac: Try to invoke the koji.read_config method. If it
fails then disable the fedabipkgdiff feature.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
fi
ENABLE_FEDABIPKGDIFF=no
else
+ # On some old platforms, the koji client object doesn't have
+ # the required .read_config method. Alas, that module doesn't
+ # have any __version__ string either. So we do as well as we
+ # can to try and detect that case and disable fedabipkgdiff if
+ # necessary.
+ AC_MSG_CHECKING([checking if koji client is recent enough ...])
+ python -c "
+import koji
+koji.read_config('koji')"
+ if test $? -eq 0; then
+ koji_version_check_ok=yes
+ else
+ koji_version_check_ok=no
+ fi
+
+ if test x$koji_version_check_ok = xno; then
+ AC_MSG_RESULT([no, disabling fedpkgdiff])
+ MISSING_FEDABIPKGDIFF_DEP=yes
+ else
+ AC_MSG_RESULT(yes)
+ fi
if test x$MISSING_FEDABIPKGDIFF_DEP = xno; then
ENABLE_FEDABIPKGDIFF=yes
fi