Problem with symlinking in typegen/typekit.rb

When generating a typekit with typegen, the first make works. When running
'make' the second time, I get this error:

Building component level0 in library level0-gnulinux
Generating typekit for level0...
/usr/lib/ruby/1.8/fileutils.rb:338:in `symlink': No such file or directory -
/home/kaltan/src/git/orocos-toolchain/tests/packages/level0/typekit or
/home/kaltan/src/git/orocos-
toolchain/tests/packages/level0/typekit/typekit/typekit (Errno::ENOENT)
from /usr/lib/ruby/1.8/fileutils.rb:338:in `ln_s'
from /usr/lib/ruby/1.8/fileutils.rb:1410:in `fu_each_src_dest0'
from /usr/lib/ruby/1.8/fileutils.rb:336:in `ln_s'
from /usr/lib/ruby/1.8/fileutils.rb:359:in `ln_sf'
from /home/kaltan/src/git/orocos-
toolchain/orogen/lib/orogen/typekit.rb:1406:in `generate'
from /home/kaltan/src/git/orocos-toolchain/orogen/bin/typegen:102

When running make a 3rd time, this disappears, when running make a 4th time,
it's there again etc. ln_sf got confused by an existing link.

The patch in attachment fixes this.

Peter

AttachmentSize
0001-typegen-remove-symlink-before-creating-it.patch902 bytes