* [PATCH] configure: Tune fedabipkgdiff dependencies detection
@ 2021-12-11 18:18 Thomas Schwinge
2021-12-17 19:10 ` Dodji Seketeli
0 siblings, 1 reply; 2+ messages in thread
From: Thomas Schwinge @ 2021-12-11 18:18 UTC (permalink / raw)
To: libabigail, Dodji Seketeli; +Cc: Thomas Schwinge
If 'configure' finds some Python koji module, but it's "insufficient" per
the testing once added in commit 90d236a03343d75ea504d53c73270e50b9000e75
"Bug 22076 - Disable fedabipkgdiff for old koji clients", we currently get,
for example:
[...]
checking python3 module: koji... yes
[...]
checking checking if koji client is recent enough ...... Traceback (most recent call last):
File "<string>", line 3, in <module>
File "[...]/koji/__init__.py", line 2016, in read_config
raise ConfigurationError("no configuration for profile name: %s"
koji.ConfigurationError: no configuration for profile name: koji
no, disabling fedpkgdiff
[...]
Here is the configuration of the package:
[...]
Enable fedabipkgdiff : auto
[...]
Note repeated 'checking' and '...', intermixed error output, 'fedpkgdiff'
typo, final 'auto' result.
Changing that to:
[...]
checking if koji client is recent enough... no
configure: WARNING: disabling fedabipkgdiff
[...]
Here is the configuration of the package:
[...]
Enable fedabipkgdiff : no
[...]
... with 'config.log':
[...]
configure:13774: checking if koji client is recent enough
configure:13784: result: no
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "[...]/koji/__init__.py", line 2016, in read_config
raise ConfigurationError("no configuration for profile name: %s"
koji.ConfigurationError: no configuration for profile name: koji
configure:13792: WARNING: disabling fedabipkgdiff
[...]
Similarly, with explicit '--enable-fedabipkgdiff', we currently get:
[...]
checking checking if koji client is recent enough ...... Traceback (most recent call last):
File "<string>", line 3, in <module>
File "[...]/koji/__init__.py", line 2016, in read_config
raise ConfigurationError("no configuration for profile name: %s"
koji.ConfigurationError: no configuration for profile name: koji
no, disabling fedpkgdiff
[...]
Here is the configuration of the package:
[...]
Enable fedabipkgdiff : yes
[...]
... instead of a fatal error.
Changing that to:
[...]
checking if koji client is recent enough... no
configure: error: unsuitable koji client
* configure.ac: Tune fedabipkgdiff dependencies detection.
Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
---
configure.ac | 79 ++++++++++++++++++++++++++--------------------------
1 file changed, 40 insertions(+), 39 deletions(-)
diff --git configure.ac configure.ac
index a77ab4d8..40f57ed9 100644
--- configure.ac
+++ configure.ac
@@ -533,11 +533,10 @@ if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then
AC_PATH_PROG(WGET, wget, no)
if test x$WGET = xno; then
- ENABLE_FEDABIPKGDIFF=no
+ MISSING_FEDABIPKGDIFF_DEP=yes
if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
AC_MSG_ERROR(could not find the wget program)
else
- MISSING_FEDABIPKGDIFF_DEP=yes
AC_MSG_NOTICE([could not find the wget program])
AC_MSG_NOTICE([disabling fedabipkgdiff as a result])
fi
@@ -567,48 +566,50 @@ if test x$CHECK_DEPS_FOR_FEDABIPKGDIFF = xyes; then
argparse logging os re subprocess sys $URLPARSE_MODULE \
xdg koji mock rpm imp tempfile mimetypes shutil six"
- if test x$ENABLE_FEDABIPKGDIFF != xno; then
- AX_CHECK_PYTHON_MODULES([$REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF],
- [$PYTHON],
- [FOUND_ALL_PYTHON_MODULES=yes],
- [FOUND_ALL_PYTHON_MODULES=no])
-
- if test x$FOUND_ALL_PYTHON_MODULES = xno; then
- 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
+ AX_CHECK_PYTHON_MODULES([$REQUIRED_PYTHON_MODULES_FOR_FEDABIPKGDIFF],
+ [$PYTHON],
+ [FOUND_ALL_PYTHON_MODULES=yes],
+ [FOUND_ALL_PYTHON_MODULES=no])
+
+ if test x$FOUND_ALL_PYTHON_MODULES = xno; then
+ MISSING_FEDABIPKGDIFF_DEP=yes
+ if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
+ AC_MSG_ERROR([missing python modules: $MISSING_PYTHON_MODULES]);
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 "
+ AC_MSG_NOTICE([missing python modules: $MISSING_PYTHON_MODULES])
+ AC_MSG_NOTICE([disabling fedabipkgdiff as a result])
+ fi
+ 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([if koji client is recent enough])
+ $PYTHON 2>&AS_MESSAGE_LOG_FD -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
+ if test $? -eq 0; then
+ koji_version_check_ok=yes
+ else
+ koji_version_check_ok=no
+ fi
+ AC_MSG_RESULT([$koji_version_check_ok])
+ if test x$koji_version_check_ok = xno; then
+ MISSING_FEDABIPKGDIFF_DEP=yes
+ if test x$MISSING_FEDABIPKGDIFF_DEP_FATAL = xyes; then
+ AC_MSG_ERROR([unsuitable koji client])
+ else
+ AC_MSG_WARN([disabling fedabipkgdiff])
+ fi
fi
fi
+
+ if test x$MISSING_FEDABIPKGDIFF_DEP = xno; then
+ ENABLE_FEDABIPKGDIFF=yes
+ else
+ ENABLE_FEDABIPKGDIFF=no
+ fi
fi
AM_CONDITIONAL(ENABLE_FEDABIPKGDIFF, test x$ENABLE_FEDABIPKGDIFF = xyes)
--
2.25.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] configure: Tune fedabipkgdiff dependencies detection
2021-12-11 18:18 [PATCH] configure: Tune fedabipkgdiff dependencies detection Thomas Schwinge
@ 2021-12-17 19:10 ` Dodji Seketeli
0 siblings, 0 replies; 2+ messages in thread
From: Dodji Seketeli @ 2021-12-17 19:10 UTC (permalink / raw)
To: Thomas Schwinge; +Cc: libabigail, Dodji Seketeli
Thomas Schwinge <thomas@codesourcery.com> a écrit:
[...]
> Signed-off-by: Thomas Schwinge <thomas@codesourcery.com>
Applied to master using "git am -p0", thanks!
Cheers,
[...]
--
Dodji
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-12-17 19:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-11 18:18 [PATCH] configure: Tune fedabipkgdiff dependencies detection Thomas Schwinge
2021-12-17 19:10 ` Dodji Seketeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).