Re: CWM Bug: --base broken on stdin

On Oct 15, 2007, at 5:54 AM, Sean B. Palmer wrote:

>
> Two bugs in one:
>
> $ echo $PWD
> /tmp
>
> $ echo ':p :q :r .' | cwm --base=http://example.org/test
> #Processed by Id: cwm.py,v 1.195 2007-08-23 16:28:29 syosi Exp
>         #    using base http://example.org/test
>
> #  Notation3 generation by
> #       notation3.py,v 1.197 2007-09-09 22:49:43 timbl Exp
>
> #   Base was: http://example.org/test
>      @prefix : <file:///private/tmp/#> .
>
>     :p     :q :r .
>
> #ENDS
>
> The first bug is that --base isn't being used.
>
Cwm parses from stdout before handling command line arguments. This  
is counterintuitive, and I will accept as a bug.


> The second bug is that when the $PWD is being used, it's resolving the
> symlink. I didn't even know that /tmp was symlinked on OS X, but
> apparently it is:
>
> $ ls -al /tmp
> lrwxr-xr-x   1 root  admin  11 Apr 18  2006 /tmp@ -> private/tmp

Your shell was telling you that you were in /tmp. However, cwm had no  
way to know that --- the OS was telling it the true path when it ran  
a pwd. The bug is way upstream from cwm, and it is unlikely we can  
fix it. I too am on OS X .

30-6-160:~ yosi$ cd /tmp/
30-6-160:/tmp yosi$ type pwd
pwd is a shell builtin
30-6-160:/tmp yosi$ /bin/pwd
/private/tmp
30-6-160:/tmp yosi$ pwd
/tmp
30-6-160:/tmp yosi$



Yosi

Received on Monday, 15 October 2007 14:12:38 UTC