Our goal is that rustfmt should be an optional dependency. If present, we use it to make generated .rs files look nicer in the tarball created by 'make dist'. But if absent, things should still compile just fine.
However, the configure test currently rejects cargo as unusable if 'cargo fmt' doesn't work, which is overly strict. Not to mention that 'test ... -a ...' is non-portable (we don't need two conditions, but if we did, the portable spelling is 'test ... && test ...'). Fixes: b2511d640b ("rust: create basic Rust bindings", v1.17.3) Signed-off-by: Eric Blake <ebl...@redhat.com> --- Pushed as b389eaea, as it lets me complete 'make check' with Rust bindings enabled but rustfmt not installed. configure.ac | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index b475dccf..d1440688 100644 --- a/configure.ac +++ b/configure.ac @@ -627,8 +627,7 @@ AS_IF([test "x$enable_rust" != "xno"],[ AS_IF([ ( cd $srcdir/rust/cargo_test && $CARGO test 2>&AS_MESSAGE_LOG_FD 1>&2 && - $CARGO doc 2>&AS_MESSAGE_LOG_FD 1>&2 && - $CARGO fmt 2>&AS_MESSAGE_LOG_FD 1>&2 + $CARGO doc 2>&AS_MESSAGE_LOG_FD 1>&2 ) ],[ AC_MSG_RESULT([yes]) ],[ @@ -638,7 +637,7 @@ AS_IF([test "x$enable_rust" != "xno"],[ ]) ]) ],[CARGO=no]) -AM_CONDITIONAL([HAVE_RUST],[test "x$CARGO" != "xno" -a "x$RUSTFMT" != "xno"]) +AM_CONDITIONAL([HAVE_RUST],[test "x$CARGO" != "xno"]) AC_MSG_CHECKING([for how to mark DSO non-deletable at runtime]) NODELETE= -- 2.41.0 _______________________________________________ Libguestfs mailing list Libguestfs@redhat.com https://listman.redhat.com/mailman/listinfo/libguestfs