[Libguestfs] GNU-isms in sed expressions in libnbd tests

Daniel P. Berrangé berrange at redhat.com
Tue May 11 13:28:30 UTC 2021


On Tue, May 11, 2021 at 01:41:07PM +0100, Richard W.M. Jones wrote:
> 
> In info/info-text.sh and info/info-list.sh, FreeBSD sed complains:
> 
>   + sed -n '/contexts:/ { N; p; q }; $ q1' info-text.out
>   sed: 1: "/contexts:/ { N; p; q } ...": extra characters at the end of q command
> 
> If I understand correctly, 'q1' means exit with error code 1, and the
> man page notes that this is a GNU extension.
> 
> I couldn't find any obvious/easy fix for this, so just FYI.
> 
> Would it help to set POSIXLY_CORRECT when running the tests to catch
> these earlier?

FWIW, libvirt simply decided to mandate install of the "gsed" package
on FreeBSD to get GNU Sed rather than worry about portability.

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the Libguestfs mailing list