NetBSD Problem Report #42557
From www@NetBSD.org Fri Jan 1 12:07:42 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id ED35163C37E
for <gnats-bugs@gnats.NetBSD.org>; Fri, 1 Jan 2010 12:07:41 +0000 (UTC)
Message-Id: <20100101120741.C000963B844@www.NetBSD.org>
Date: Fri, 1 Jan 2010 12:07:41 +0000 (UTC)
From: ekamperi@gmail.com
Reply-To: ekamperi@gmail.com
To: gnats-bugs@NetBSD.org
Subject: cd(1) doesn't support standard -P option
X-Send-Pr-Version: www-1.0
>Number: 42557
>Category: bin
>Synopsis: cd(1) doesn't support standard -P option
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 01 12:10:00 +0000 2010
>Closed-Date: Sat Jan 30 19:28:29 +0000 2010
>Last-Modified: Sat Jan 30 19:28:29 +0000 2010
>Originator: Stathis Kamperis
>Release: 5.0.1
>Organization:
>Environment:
NetBSD 5.0.1 with GENERIC kernel / i386
>Description:
cd(1) doesn't seem to support -P option which is mandated by POSIX.
I accidentally noticed it like this:
$ pwd
/home/beket/pcca-tests/stdio.h
$ git pull
cd: Illegal option -P
Cannot chdir to ../, the toplevel of the working tree
$
opensolaris and dragonflybsd that I checked, support it.
>How-To-Repeat:
Type cd -P in a shell.
>Fix:
>Release-Note:
>Audit-Trail:
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: bin/42557: cd(1) doesn't support standard -P option
Date: Fri, 1 Jan 2010 17:54:43 +0000
On Fri, Jan 01, 2010 at 12:10:00PM +0000, ekamperi@gmail.com wrote:
> cd(1) doesn't seem to support -P option which is mandated by POSIX.
> I accidentally noticed it like this:
> [same problem as PR 42168]
What is cd -P supposed to do? The bash and zsh docs don't really make
sense and as far as I can tell from running them experimentally -P
must stand for "work properly". The ksh docs are a little clearer, but
anyway this behavior is the default in sh.
Should we have sh's cd builtin accept and ignore -P?
--
David A. Holland
dholland@netbsd.org
From: Stathis Kamperis <ekamperi@gmail.com>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: bin/42557: cd(1) doesn't support standard -P option
Date: Fri, 1 Jan 2010 20:13:32 +0200
The semantics of -P have slightly changed between Issue 6 and 7 of the standard.
I'm linking to issue 7:
http://www.opengroup.org/onlinepubs/9699919799/utilities/cd.html
From: "David A. Holland" <dholland@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42557 CVS commit: src/bin/sh
Date: Fri, 1 Jan 2010 19:35:00 +0000
Module Name: src
Committed By: dholland
Date: Fri Jan 1 19:34:59 UTC 2010
Modified Files:
src/bin/sh: cd.c sh.1
Log Message:
Make the cd builtin accept and ignore -P, which is a kshism that has been
allowed to leak into POSIX and selects the behavior cd already implements.
Closes PR bin/42557 and also relevant to PR pkg/42168.
I suppose this should probably be pulled up to both -4 and -5...
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/bin/sh/cd.c
cvs rdiff -u -r1.94 -r1.95 src/bin/sh/sh.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->pending-pullups
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 24 Jan 2010 19:45:07 +0000
State-Changed-Why:
pullup-5 #1274, pullup-4 #1380
From: Manuel Bouyer <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42557 CVS commit: [netbsd-4] src/bin/sh
Date: Wed, 27 Jan 2010 21:01:58 +0000
Module Name: src
Committed By: bouyer
Date: Wed Jan 27 21:01:58 UTC 2010
Modified Files:
src/bin/sh [netbsd-4]: cd.c sh.1
Log Message:
Pull up following revision(s) (requested by dholland in ticket #1380):
bin/sh/cd.c: revision 1.40
bin/sh/sh.1: revision 1.95
bin/sh/sh.1: revision 1.97
Make the cd builtin accept and ignore -P, which is a kshism that has been
allowed to leak into POSIX and selects the behavior cd already implements.
Closes PR bin/42557 and also relevant to PR pkg/42168.
I suppose this should probably be pulled up to both -4 and -5...
Bump date for cd -P support.
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.4.1 src/bin/sh/cd.c
cvs rdiff -u -r1.85.2.1 -r1.85.2.2 src/bin/sh/sh.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Soren Jacobsen <snj@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/42557 CVS commit: [netbsd-5] src/bin/sh
Date: Sat, 30 Jan 2010 19:24:33 +0000
Module Name: src
Committed By: snj
Date: Sat Jan 30 19:24:33 UTC 2010
Modified Files:
src/bin/sh [netbsd-5]: cd.c sh.1
Log Message:
Pull up following revision(s) (requested by dholland in ticket #1274):
bin/sh/cd.c: revision 1.40
bin/sh/sh.1: revision 1.95
Make the cd builtin accept and ignore -P, which is a kshism that has been
allowed to leak into POSIX and selects the behavior cd already implements.
Closes PR bin/42557 and also relevant to PR pkg/42168.
I suppose this should probably be pulled up to both -4 and -5...
To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.39.26.1 src/bin/sh/cd.c
cvs rdiff -u -r1.87.18.1 -r1.87.18.2 src/bin/sh/sh.1
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: pending-pullups->closed
State-Changed-By: snj@NetBSD.org
State-Changed-When: Sat, 30 Jan 2010 19:28:29 +0000
State-Changed-Why:
Pulled up to netbsd-4 and netbsd-5.
>Unformatted:
(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-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.