On Monday, 1 October 2018 16:53:12 CEST Richard W.M. Jones wrote:
On Mon, Oct 01, 2018 at 04:40:19PM +0200, Pino Toscano wrote:
> -o rhv-upload requires python3, and nbdkit with the python3 plugin, so
> skip this test if they are not installed.
> ---
>
> v1 is:
>
https://www.redhat.com/archives/libguestfs/2018-October/msg00008.html
>
> v2v/test-v2v-o-rhv-upload.sh | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/v2v/test-v2v-o-rhv-upload.sh b/v2v/test-v2v-o-rhv-upload.sh
> index 8bda7cc0b..23d2ad7a0 100755
> --- a/v2v/test-v2v-o-rhv-upload.sh
> +++ b/v2v/test-v2v-o-rhv-upload.sh
> @@ -28,6 +28,8 @@ set -x
> $TEST_FUNCTIONS
> skip_if_skipped
> skip_if_backend uml
> +skip_unless python3 --version
> +skip_unless nbdkit python3 --version
> skip_unless_phony_guest windows.img
>
> libvirt_uri="test://$abs_top_builddir/test-data/phony-guests/guests.xml"
This will only work on Fedora because Fedora renames the upstream
nbdkit python plugin to nbdkit-python3-plugin.so:
https://src.fedoraproject.org/rpms/nbdkit/blob/master/f/nbdkit.spec#_679
However that's (sort of) OK since our current implementation of
-o rhv-upload *also* assumes the plugin has been renamed.
Yes, that is why I added the check there, as it matches the current
implementation in -o rhv-upload. (TBH, there is a small flaw there,
albeit with no actual changes: the name of the Python interpreter is
used also as the name of the nbdkit plugin, which again is the case
only on Fedora.)
--
Pino Toscano