common/hooks/post-install: reorder some hooks so that no unnecessary INSTALL/REMOVE scripts are generated.
This commit is contained in:
parent
fa35b14201
commit
9b60085684
3 changed files with 2 additions and 0 deletions
17
common/hooks/post-install/04-create-xbps-vpkg-files.sh
Normal file
17
common/hooks/post-install/04-create-xbps-vpkg-files.sh
Normal file
|
@ -0,0 +1,17 @@
|
|||
# This hook generates XBPS configuration files for virtual packages.
|
||||
|
||||
hook() {
|
||||
local _tmpf
|
||||
|
||||
# If package provides virtual packages, create dynamically the
|
||||
# required configuration file.
|
||||
if [ -n "$provides" ]; then
|
||||
_tmpf=$(mktemp) || msg_error "$pkgver: failed to create tempfile.\n"
|
||||
echo "# Virtual packages provided by '${pkgname}':" >>${_tmpf}
|
||||
for f in ${provides}; do
|
||||
echo "virtualpkg=${f}:${pkgname}" >>${_tmpf}
|
||||
done
|
||||
install -Dm644 ${_tmpf} ${PKGDESTDIR}/etc/xbps/virtualpkg.d/${pkgname}.vpkg
|
||||
rm -f ${_tmpf}
|
||||
fi
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue