summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoonKyu Park <sk7.park@samsung.com>2015-12-04 17:03:56 +0900
committerSoonKyu Park <sk7.park@samsung.com>2015-12-04 17:03:56 +0900
commite7d047a09a00b7f9789dcc2c0a3b6c49d3b4b771 (patch)
treee114deb12a443c6d8d6ef8ad8e75b92011994051
parent29837a4f73f01639b606740983a97c349f85044b (diff)
downloadrpm-e7d047a09a00b7f9789dcc2c0a3b6c49d3b4b771.tar.gz
rpm-e7d047a09a00b7f9789dcc2c0a3b6c49d3b4b771.tar.bz2
rpm-e7d047a09a00b7f9789dcc2c0a3b6c49d3b4b771.zip
Change-Id: I157f6a027820e0448e1ee95e10d1b42e8c95fcea
-rw-r--r--scripts/find-debuginfo.sh14
1 files changed, 9 insertions, 5 deletions
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index efcc72ed2..8b7a6c44a 100644
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -142,12 +142,16 @@ debug_link()
# this should correspond to what brp-symlink is doing
case $t in
/usr*)
- link_relative "$t" "$l" "$RPM_BUILD_ROOT"
- ;;
+ link_relative "$t" "$l" "$RPM_BUILD_ROOT"
+ ;;
*)
- mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \
- ln -snf "$t" "$RPM_BUILD_ROOT$l"
- ;;
+ if [ ! -e $t ]; then
+ link_relative "$t" "$l" "$RPM_BUILD_ROOT"
+ else
+ mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \
+ ln -snf "$t" "$RPM_BUILD_ROOT$l"
+ fi
+ ;;
esac
}