aboutsummaryrefslogtreecommitdiffstats
path: root/find-debuginfo.sh
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-07-27 17:38:38 +0000
committerThierry Vignaud <tv@mageia.org>2012-07-27 17:38:38 +0000
commite260951dcea87ee455b050362f685934ee73eee1 (patch)
tree48f3c144b964f7b4d1ee950aeb6a9919b8466d2a /find-debuginfo.sh
parent2d2ba482a77ac385b318afe2f4db22ceaad70d76 (diff)
downloadrpm-setup-e260951dcea87ee455b050362f685934ee73eee1.tar
rpm-setup-e260951dcea87ee455b050362f685934ee73eee1.tar.gz
rpm-setup-e260951dcea87ee455b050362f685934ee73eee1.tar.bz2
rpm-setup-e260951dcea87ee455b050362f685934ee73eee1.tar.xz
rpm-setup-e260951dcea87ee455b050362f685934ee73eee1.zip
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 <roland@redhat.com>, 2010-08-09)
Diffstat (limited to 'find-debuginfo.sh')
-rwxr-xr-xfind-debuginfo.sh2
1 files changed, 1 insertions, 1 deletions
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