Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-05-03 03:34:13


David Abrahams wrote:
> Just tracking down bugs in our current code, I ran across this in
> my -d+5 output:
>
> os.path.is_rooted c:\tmp\rene\boost-build-test\Jamfile
>
> Of course, that returns false, even on NT, because os.path expects to
> operate entirely in terms of "normalized paths"... sometimes. The
> interface specification isn't clear about which functions take native
> paths and which take normalized paths. Why don't we just normalize all
> paths internally if that's what it takes? Why burden the users of
> os.path with keeping track of both normalized and non-normalized paths?

They should not keep track of anything. There's one function which operates
on native path names: os.path.make. All the other require normalized paths.

I believe this is right -- the whole purpose of os.path is to get away from
paths that can have a dozen different spellings. For example:

path1 = foo ;
path2 = ../bar ;

$(path1:D) gives empty string
$(path2:R=/home/ghost) gives /home/ghost/../bar

Both cases are very nasty.

- Volodya

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk