[Xorp-hackers] Problems with Mkdir

Bruce Simpson bms at incunabulum.net
Fri Dec 4 04:35:25 PST 2009


Ben Greear wrote:
> Mkdir fails if directory already exists, which breaks (re)build on Linux, at least.
>
> Using this:
>
> # Mkdir fails if dir already exists..use this instead.
> def mkdir_path(path):
>      if not os.access(path, os.F_OK):
>          os.mkdirs(path)
>
> and then calling mkdir_path instead of Execute(Mkdir
> fixes the problem for me.
>   

Hmm, haven't seen anything like this, and have done a number of 
incremental rebuilds since checking it in (this is on FreeBSD).

Can you provide more details about the error, and are you using a 
different SCons version?
I'm using SCons 1.2.0.d20090223 here.

mkdir_func() in SCons/Defaults.py looks as though it should ignore 
EEXISTS correctly already, so I wonder why this would cause a problem.

Having said that, SCons' support for symlinks is very poor.

I fought with SCons for a while before I could get it to work, and 
what's in tree is not 100% 'the SCons way' as the .so symlinks are not 
in the dependency graph; they're just actions.

cheers,
BMS
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 1.diff
Url: http://mailman.ICSI.Berkeley.EDU/pipermail/xorp-hackers/attachments/20091204/f4e0a564/attachment.ksh 


More information about the Xorp-hackers mailing list