Add condition for external installed pkgs 81/133781/2
authorJunghyun Yeon <jungh.yeon@samsung.com>
Tue, 13 Jun 2017 09:35:49 +0000 (18:35 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Wed, 14 Jun 2017 08:54:04 +0000 (17:54 +0900)
- Skip making bin directories when dest directory is symlink

Change-Id: Iebb3df57b62d5239ec43b5db7c365dfa815de1f2
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
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;
   }