mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/shim: Fix race condition creating linkfarm.stamp
In the case the while loop gets interrupted, the target musn't appear as up-to-date. The mov $X.tmp $X must be the last action of the rule. Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
This commit is contained in:
1 parent
63feb88edf
commit
bf82703e8d
1 file changed
+2
-2
@@ -32,9 +32,9 @@ linkfarm.stamp: $(DEP_DIRS) $(DEP_FILES) FORCE
|
||||
echo $(f) >> linkfarm.stamp.tmp ;)
|
||||
cmp -s linkfarm.stamp.tmp linkfarm.stamp && \
|
||||
rm linkfarm.stamp.tmp || { \
|
||||
cat linkfarm.stamp.tmp | while read f; \
|
||||
do rm -f "$(D)/$$f"; ln -s "$(XEN_ROOT)/$$f" "$(D)/$$f"; done; \
|
||||
mv linkfarm.stamp.tmp linkfarm.stamp; \
|
||||
cat linkfarm.stamp | while read f; \
|
||||
do rm -f "$(D)/$$f"; ln -s "$(XEN_ROOT)/$$f" "$(D)/$$f"; done \
|
||||
}
|
||||
|
||||
# Copy enough of the tree to build the shim hypervisor
|
||||
|
||||