summaryrefslogtreecommitdiff
path: root/src/logic/slbt_exec_install.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logic/slbt_exec_install.c')
-rw-r--r--src/logic/slbt_exec_install.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/logic/slbt_exec_install.c b/src/logic/slbt_exec_install.c
index cf9ba77..e5a9d9e 100644
--- a/src/logic/slbt_exec_install.c
+++ b/src/logic/slbt_exec_install.c
@@ -168,8 +168,29 @@ static int slbt_exec_install_entry(
base = slnkname;
/* source (build) symlink target */
- if (readlink(slnkname,target,sizeof(target)) <= 0)
- return -1;
+ if (readlink(slnkname,target,sizeof(target)) <= 0) {
+ /* -avoid-version? */
+ if (stat(slnkname,&st))
+ return -1;
+
+ /* dstfile */
+ if ((size_t)snprintf(dstfile,sizeof(dstfile),"%s/%s",
+ dstdir,base) >= sizeof(dstfile))
+ return -1;
+
+ /* single spawn, no symlinks */
+ *src = slnkname;
+ *dst = dest ? 0 : dstfile;
+
+ if (!(dctx->cctx->drvflags & SLBT_DRIVER_SILENT))
+ if (slbt_output_install(dctx,ectx))
+ return -1;
+
+ if (((ret = slbt_spawn(ectx,true)) < 0) || ectx->exitcode)
+ return -1;
+
+ return 0;
+ }
/* srcfile: .libs/libfoo.so.x.y.z */
slash = strrchr(srcfile,'/');