From: Roland McGrath Date: Mon, 9 Aug 2010 12:27:03 +0000 (+0300) Subject: Fix find-debuginfo.sh behavior on cross-directory hardlinks (RhBug:618426) X-Git-Tag: rpm-4.9.0-beta1~512 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c72fc6adba1acb4fe49e31273c2437703b15afeb;p=platform%2Fupstream%2Frpm.git Fix find-debuginfo.sh behavior on cross-directory hardlinks (RhBug:618426) - The find-debuginfo.sh script makes hard links of .debug files to correspond to hard links between install binaries. It can fail to create one of these .debug hard links if it's in a directory that didn't exist at that point in the script run. How this happens depends on things like the order "find" lists files, so it can be hard to reproduce off hand. --- diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh index 3ada962..e050dc1 100644 --- a/scripts/find-debuginfo.sh +++ b/scripts/find-debuginfo.sh @@ -191,7 +191,7 @@ while read nlinks inum f; do link=$debugfn get_debugfn "$linked" echo "hard linked $link to $debugfn" - ln -nf "$debugfn" "$link" + mkdir -p "$(dirname "$link")" && ln -nf "$debugfn" "$link" continue else eval linked_$inum=\$f