midgaze: except you cannot do rename() on a directory -- or, more specifically, it either must not exist or must be empty (c.f. -- man 2 rename)
belak: Ok, I thought you said that was a requirement before. Have you looked at how the glibc or perhaps even bash rpms do it then? They are certainly doing things atomically for individual files. Having a partially written glibc would be a... problem. Note, however, the sane thing remains to ensure that they won't be called during upgrade time. If you don't have a plan for handling this, then what are you going to do when there's a system failure?