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.
This commit is contained in:
parent
2e2b36e8f2
commit
13901bc715
1 changed files with 7 additions and 2 deletions
|
@ -19,22 +19,27 @@ done
|
|||
|
||||
_vsv() {
|
||||
local service="$1"
|
||||
local LN_OPTS="-s"
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
msg_red "$pkgver: vsv: 1 argument expected: <service>\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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue