Define a new PACKAGE_TYPE for package groups.

Technically these are not native or target type packages, as we are
not building anything; they may be made up of many packages of
different types. So make sure that 'chocpkg info' shows something
distinct and different for this kind of package.
This commit is contained in:
Simon Howard 2016-02-25 20:33:42 -05:00
parent e66e81775f
commit 4f5c9510c3
2 changed files with 10 additions and 7 deletions

View file

@ -86,6 +86,8 @@ configure_for_package() {
native)
PACKAGE_INSTALL_DIR="$NATIVE_INSTALL_DIR"
;;
package-group)
;;
*)
error_exit "Unknown package type $PACKAGE_TYPE"
;;

View file

@ -1,15 +1,9 @@
package_group::init() {
PACKAGE_TYPE=package-group
PKGGRP_PACKAGES="$*"
}
# Package group is installed if all its packages are installed.
check_installed() {
for package in $PKGGRP_PACKAGES; do
chocpkg installed "$package"
done
}
do_fetch() {
error_exit "Can't fetch a package group, only install it."
}
@ -43,3 +37,10 @@ cmd_dependencies() {
done | sort | uniq
}
# Package group is installed if all its packages are installed.
cmd_installed() {
for package in $PKGGRP_PACKAGES; do
chocpkg installed "$package"
done
}