Danek Duvall wrote:
> If your cwd has been removed, pkg dies.  Here
> 
>     http://cr.opensolaris.org/~dduvall/pkg-bug2964/
> 
> is a fix I'd been sitting on for no particular reason.  Thoughts are
> welcome on whether looking at $PWD as a last resort is too much of a
> stretch.  ksh documents it as being set by the shell, and indeed, it and $_
> are the only two environment variables initially set (and exported) by ksh.
> Bourne shell doesn't, but it appears to be the only one.

I can't work out a case where $PWD would be valid yet os.getcwd() 
failed.  Surely $PWD is less useful than os.getcwd() since if the later 
failed chances are $PWD was just the value it would have returned if the 
directory hadn't been removed.

So I'd drop the second try clause at 1785 and just set mydir = None if 
os.getcwd() fails.

-- 
Darren J Moffat
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to