<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Non-portable "readlink" usage"
href="https://bugs.freedesktop.org/show_bug.cgi?id=64634">64634</a>
</td>
</tr>
<tr>
<th>Assignee</th>
<td>portland-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Summary</th>
<td>Non-portable "readlink" usage
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>OS</th>
<td>Mac OS X (All)
</td>
</tr>
<tr>
<th>Reporter</th>
<td>dmacks@netspace.org
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Version</th>
<td>1.1.0 rc1
</td>
</tr>
<tr>
<th>Component</th>
<td>xdg-utils
</td>
</tr>
<tr>
<th>Product</th>
<td>Portland
</td>
</tr></table>
<p>
<div>
<pre>Many of the xdg-utils scripts use shell commands like `readlink -f $path`.
However, this -f flag is only available in some flavors of the readlink command
and has different meanings in some as well. For example, the (I assume)
intended meaning is as in GNU readlink manpage:
-f, --canonicalize
canonicalize by following every symlink in every component of
the given name recursively; all but the last component must
exist
OS X is BSDish not GNUish. Even up through 10.7, their readlink command does
not support the -f flag, and googling around doesn't find that it was added in
10.8 (or if so, that it would have the same meaning).
The immediate effect is that self-tests fail with messages such as:
readlink: illegal option -f
usage: readlink [-n] [file ...]
And obviously whatever the scripts are hoping to do with the canonical version
of $path won't be getting the expected string.
I can install the GNU coreutils suite (via fink, etc or manually) and get the
readline that xdg-utils wants, but that's a pretty heavy dependency for such a
simple set of sscripts. Here's one discussion of possible solutions:
<a href="http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac">http://stackoverflow.com/questions/1055671/how-can-i-get-the-behavior-of-gnus-readlink-f-on-a-mac</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>