From: Wolfgang Denk Date: Mon, 28 Jan 2008 21:56:03 +0100 Subject: [U-Boot-Users] [PATCH] Use `ln -sf` rather than `rm -f && ln -s` In-Reply-To: Your message of "Mon, 28 Jan 2008 06:38:58 EST." <200801280638.59012.vapier@gentoo.org> Message-ID: <20080128205603.5863B24781@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de In message <200801280638.59012.vapier@gentoo.org> you wrote: > odd ... git-send-email ate the explanatory text ... > --- > The -f option to `ln` should give the same behavior as the -f option to the > `rm` command. It is better to do this in one shot so as to avoid race > conditions when building in parallel. I build on a quad G5 and without this > change, it isn't uncommon for the build to fail when using -j8 due to this > small window where the files don't actually exist. Note that "ln -s -f" will come down to two separate system calls as well: ... unlink(); symlink(); ... So you don't avoid the race condition; you're just making it a little less likely at the cost of reduced portability. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Software suppliers are trying to make their software packages more ``user-friendly''. . . . Their best approach, so far, has been to take all the old brochures, and stamp the words, ``user-friendly'' on the cover. - Bill Gates