Add support to install/remove subpkgs independently of its sourcepkg.
--HG-- extra : convert_revision : 5495fb6558fa71dd843f54981313df233236ac50
This commit is contained in:
parent
b225a1dc30
commit
04a0248ef1
4 changed files with 62 additions and 13 deletions
|
@ -42,15 +42,29 @@ _EOF
|
|||
|
||||
xbps_write_metadata_pkg()
|
||||
{
|
||||
local pkg="$1"
|
||||
local subpkg=
|
||||
|
||||
for subpkg in ${subpackages}; do
|
||||
if [ "${pkg}" != "${sourcepkg}" ] && \
|
||||
[ "${pkg}" != "${sourcepkg}-${subpkg}" ]; then
|
||||
continue
|
||||
fi
|
||||
check_installed_pkg ${sourcepkg}-${subpkg}-${version}
|
||||
[ $? -eq 0 ] && continue
|
||||
|
||||
if [ ! -f $XBPS_TEMPLATESDIR/${sourcepkg}/${subpkg}.template ]; then
|
||||
msg_error "Cannot find subpackage template!"
|
||||
fi
|
||||
. $XBPS_TEMPLATESDIR/${sourcepkg}/${subpkg}.template
|
||||
pkgname=${sourcepkg}-${subpkg}
|
||||
xbps_write_metadata_pkg_real
|
||||
run_template ${sourcepkg}
|
||||
[ "${pkg}" = "${sourcepkg}-${subpkg}" ] && break
|
||||
done
|
||||
|
||||
[ -n "${subpackages}" ] && [ "$pkg" != "${sourcepkg}" ] && return $?
|
||||
|
||||
if [ -n "${subpackages}" ]; then
|
||||
run_template ${sourcepkg}
|
||||
rm -rf $XBPS_DESTDIR/${sourcepkg}-${version}/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue