Michael Stone
2013-Aug-08 02:57 UTC
[Pkg-xen-devel] Bug#718898: cut no longer works with newline as delimiter
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
Possibly Parallel Threads
- Bug#718898: marked as done (coreutils: cut no longer works with newline as delimiter)
- Bug#718898: Bug#718898: cut no longer works with newline as delimiter
- Processed: Re: Bug#718898: cut no longer works with newline as delimiter
- Bug#718898: cut no longer works with newline as delimiter
- ssh-copy-id no newline bug