[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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

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.

Eric fixed it in:

> Would it help to set POSIXLY_CORRECT when running the tests to catch
> these earlier?

Apparently this would not have worked because POSIXLY_CORRECT doesn't
suppress the GNU extensions, only deconflicts them in cases where they
would conflict with a POSIX standard.


Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-builder quickly builds VMs from scratch

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]