realpath fails with inexplicable error message "Not a directory"

Bug #1474519 reported by Karl-Philipp Richter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
coreutils
Fix Released
Undecided
Unassigned
coreutils (Ubuntu)
Fix Committed
Undecided
Pádraig Brady

Bug Description

After reading `man realpath` it should be clear why

    $ cd /tmp
    $ touch a
    $ realpath ./a/..
    realpath: ‘./a/..’: Not a directory

occurs. The manpage doesn't contain the word "directory" and thus the error message can't make sense.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: coreutils 8.23-3ubuntu1
Uname: Linux 4.1.1-040101-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Jul 14 21:09:07 2015
InstallationDate: Installed on 2015-06-08 (36 days ago)
InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SourcePackage: coreutils
UpgradeStatus: Upgraded to vivid on 2015-06-09 (35 days ago)

Revision history for this message
Karl-Philipp Richter (krichter722) wrote :
Revision history for this message
Pádraig Brady (p-draigbrady) wrote :

You need the -m option to not pass the 'a' component down where it will be interpreted as a directory

Changed in coreutils (Ubuntu):
assignee: nobody → Pádraig Brady (p-draigbrady)
status: New → Invalid
Revision history for this message
Karl-Philipp Richter (krichter722) wrote :

I see, but this is not a request, but one to improve the docs to allow users to figure this out by themselves and replace an incomprehensive error message.

Revision history for this message
Pádraig Brady (p-draigbrady) wrote :
Changed in coreutils:
status: New → Fix Released
Changed in coreutils (Ubuntu):
status: Invalid → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.