Add condition for external installed pkgs 60/134360/1 accepted/tizen/3.0/common/20170619.133407 accepted/tizen/3.0/ivi/20170619.075724 accepted/tizen/3.0/mobile/20170619.075634 accepted/tizen/3.0/tv/20170619.075651 accepted/tizen/3.0/wearable/20170619.075708 submit/tizen_3.0/20170616.060706
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 13 Jun 2017 09:35:49 +0000 (18:35 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 16 Jun 2017 06:15:58 +0000 (06:15 +0000)
- Skip making bin directories when dest directory is symlink

Change-Id: Iebb3df57b62d5239ec43b5db7c365dfa815de1f2
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
(cherry picked from commit 5ff02ea6b074b3d68efec48821bce65d8b51f503)

src/tpk/step/filesystem/step_create_symbolic_link.cc

index fd29a12be864fdc0cd1142f498a03500230db69b..4a2f6b039dcd7d326ba909912d45cf80eb8c725e 100644 (file)
@@ -29,7 +29,8 @@ bool CreateSymLink(application_x* app, InstallerContext* context) {
   bf::path bindir = context->pkg_path.get() /
       bf::path("bin");
   LOG(DEBUG) << "Creating dir: " << bindir;
-  if (!common_installer::CreateDir(bindir)) {
+  if (!bf::is_symlink(symlink_status(bindir)) &&
+      !common_installer::CreateDir(bindir)) {
     LOG(ERROR) << "Directory creation failure: " << bindir;
     return false;
   }