From 13901bc715d2de27e7bdd79214ff342a1f60a03e Mon Sep 17 00:00:00 2001 From: Doan Tran Cong Danh Date: Sat, 13 Apr 2019 16:18:41 +0700 Subject: [PATCH] xbps-src: vsv: force linking on forced rebuild re-run `xbps-src -f install pkg` on packages with service files failed because the link was created from previous run. --- common/environment/setup/install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/environment/setup/install.sh b/common/environment/setup/install.sh index 17771729700..f9a1ace90e7 100644 --- a/common/environment/setup/install.sh +++ b/common/environment/setup/install.sh @@ -19,22 +19,27 @@ done _vsv() { local service="$1" + local LN_OPTS="-s" if [ $# -lt 1 ]; then msg_red "$pkgver: vsv: 1 argument expected: \n" return 1 fi + if [ -n "$XBPS_BUILD_FORCEMODE" ]; then + LN_OPTS+="f" + fi + vmkdir etc/sv vcopy "${FILESDIR}/$service" etc/sv chmod 755 ${PKGDESTDIR}/etc/sv/${service}/run if [ -r ${PKGDESTDIR}/etc/sv/${service}/finish ]; then chmod 755 ${PKGDESTDIR}/etc/sv/${service}/finish fi - ln -s /run/runit/supervise.${service} ${PKGDESTDIR}/etc/sv/${service}/supervise + ln ${LN_OPTS} /run/runit/supervise.${service} ${PKGDESTDIR}/etc/sv/${service}/supervise if [ -r ${PKGDESTDIR}/etc/sv/${service}/log/run ]; then chmod 755 ${PKGDESTDIR}/etc/sv/${service}/log/run - ln -s /run/runit/supervise.${service}-log ${PKGDESTDIR}/etc/sv/${service}/log/supervise + ln ${LN_OPTS} /run/runit/supervise.${service}-log ${PKGDESTDIR}/etc/sv/${service}/log/supervise fi }