]> sourceware.org Git - libabigail.git/commitdiff
Bug 22076 - Disable fedabipkgdiff for old koji clients
authorDodji Seketeli <dodji@redhat.com>
Wed, 22 Nov 2017 16:27:02 +0000 (17:27 +0100)
committerDodji Seketeli <dodji@redhat.com>
Wed, 22 Nov 2017 16:30:41 +0000 (17:30 +0100)
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>
configure.ac

index b76ff0e5bb5d15144d84bb9b5fad71b5bdb67aef..9d4da8e17dee9b01cd0e129ea3fcb8dc809af733 100644 (file)
@@ -369,6 +369,27 @@ if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then
        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
This page took 0.034818 seconds and 5 git commands to generate.