[Pkg-xen-devel] Bug#718898: cut no longer works with newline as delimiter
Michael Stone
mstone at debian.org
Thu Aug 8 02:57:41 UTC 2013
On Wed, Aug 07, 2013 at 08:09:59PM -0600, Bob Proulx wrote:
>The behavior of the upstream GNU cut has changed. It is no longer
>allows the usage of cutting lines as fields by setting a newline as
>the delimiter. This has broken /etc/xen/scripts/vif-bridge which uses
>it in this way.
>
>This was originally reported by Volker Klasen against the coreutils
>package. However with the information that this is an intentional
>behavior change upstream in order to address other problems and with
>the use being problematic I am reassigning this to the
>xen-utils-common which owns the /etc/xen/scripts/vif-bridge script.
>
>Here is a patch that I believe should fix the problem. I will also
>attach it so that there won't be any mailer problems with the
>transport of it.
I'm not particularly thrilled with this, as I generally prefer coreutils
to maintain compatability. As it's early in the cycle, let's just see
how much breaks; at least on my system some digging around doesn't
reveal any other instances. I'm motivated somewhat by the fact that the
syntax in question is really bad form: making the end-of-line whitespace
significant tends to cause maintenance issues, and that usage of cut is
not at all portable.
POSIX defines cut as being line-based, and in various sections discusses
the possibility that the selection criteria don't fall within a line. It
doesn't specifically address the question of what should happen when -d
is a newline character, but a quick check of a few different platforms
suggests that nobody should rely on any particular behavior.
I'll add a Breaks: xen-utils-common to coreutils in the next upload.
Mike Stone
More information about the Pkg-xen-devel
mailing list