NetBSD Problem Report #52210

From www@NetBSD.org  Tue May  2 23:47:39 2017
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 7BAA47A1FB
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  2 May 2017 23:47:39 +0000 (UTC)
Message-Id: <20170502234738.8733B7A2B0@mollari.NetBSD.org>
Date: Tue,  2 May 2017 23:47:38 +0000 (UTC)
From: dhgutteridge@sympatico.ca
Reply-To: dhgutteridge@sympatico.ca
To: gnats-bugs@NetBSD.org
Subject: The recent change to ksh(1)'s misc.c breaks traditional parameter substitution behaviour
X-Send-Pr-Version: www-1.0

>Number:         52210
>Category:       bin
>Synopsis:       The recent change to ksh(1)'s misc.c breaks traditional parameter substitution behaviour
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 02 23:50:00 +0000 2017
>Closed-Date:    Wed May 03 22:01:53 +0000 2017
>Last-Modified:  Wed May 03 22:01:53 +0000 2017
>Originator:     David H. Gutteridge
>Release:        HEAD as of May 2, 2017
>Organization:
>Environment:
NetBSD arcus-v3.nonus-porta.net 7.99.71 NetBSD 7.99.71 (GENERIC) #0: Tue May  2 08:20:20 UTC 2017  mkrepro@mkrepro.NetBSD.org:/usr/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
Revision 1.16 of src/bin/ksh/misc.c breaks some traditional ksh(1)
parameter substitution behaviour, e.g.:

From source prior to the change:

[disciple@arcusiii:disciple]$ echo $PWD
/home/disciple
[disciple@arcusiii:disciple]$ echo ${PWD##*/} 
disciple

From source after the change:

[disciple@arcus-v3:disciple]$ echo $PWD
/home/disciple
[disciple@arcus-v3:disciple]$ echo ${PWD##*/} 
/home/disciple

(I'm assuming this wasn't intended, but if it was, then the ksh(1) man
page needs updating as well.)

>How-To-Repeat:
Try "echo ${PWD##*/}" on a recent build.
>Fix:

>Release-Note:

>Audit-Trail:
From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/52210 CVS commit: src/bin/ksh
Date: Tue, 2 May 2017 20:41:34 -0400

 Module Name:	src
 Committed By:	christos
 Date:		Wed May  3 00:41:34 UTC 2017

 Modified Files:
 	src/bin/ksh: misc.c

 Log Message:
 PR/52210: David H. Gutteridge: revert var pattern handling.


 To generate a diff of this commit:
 cvs rdiff -u -r1.16 -r1.17 src/bin/ksh/misc.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "David H. Gutteridge" <dhgutteridge@sympatico.ca>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/52210 CVS commit: src/bin/ksh
Date: Wed, 03 May 2017 17:37:21 -0400

 Confirming misc.c revision 1.17 fixes the problem. This PR can be
 closed.

 Thanks,

 Dave

State-Changed-From-To: open->closed
State-Changed-By: christos@NetBSD.org
State-Changed-When: Wed, 03 May 2017 18:01:53 -0400
State-Changed-Why:
confirmed fixed


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.