Modify how to make symbolic link in 'find-debuginfo.sh' script 64/53364/1 accepted/tizen/mobile/20151206.224321 accepted/tizen/tv/20151206.224337 accepted/tizen/wearable/20151206.224357 submit/tizen/20151204.081906
authorSoonKyu Park <sk7.park@samsung.com>
Fri, 4 Dec 2015 08:03:56 +0000 (17:03 +0900)
committerSoonKyu Park <sk7.park@samsung.com>
Fri, 4 Dec 2015 08:03:56 +0000 (17:03 +0900)
Change-Id: I157f6a027820e0448e1ee95e10d1b42e8c95fcea

scripts/find-debuginfo.sh

index efcc72e..8b7a6c4 100644 (file)
@@ -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
 }