From e260951dcea87ee455b050362f685934ee73eee1 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 27 Jul 2012 17:38:38 +0000 Subject: 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. (rpm.org, Roland McGrath , 2010-08-09) --- NEWS | 1 + find-debuginfo.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 17725b5..d78adbf 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ - sync find-debuginfo.sh with upstream rpm.org: o add -r flag to find-debuginfo.sh to invoke eu-strip --reloc-debug-sections o drop useless rpm5 bits (less divergence with upstream) + o fix behavior on cross-directory hardlinks (RhBug:618426) - kill unused find-provides.perl.in - prevent RPM_BUILD_ROOT to break brp-* scripts if it contains spaces (rpm.org#843) diff --git a/find-debuginfo.sh b/find-debuginfo.sh index a0a83e4..98cc45b 100755 --- a/find-debuginfo.sh +++ b/find-debuginfo.sh @@ -211,7 +211,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 -- cgit v1.2.1