From 4f5c9510c382c45c1c51f911d03389953bef7cba Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 25 Feb 2016 20:33:42 -0500 Subject: [PATCH] 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. --- chocpkg/chocpkg | 2 ++ chocpkg/modules/package_group.sh | 15 ++++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/chocpkg/chocpkg b/chocpkg/chocpkg index 6b9f1d3..019ad84 100755 --- a/chocpkg/chocpkg +++ b/chocpkg/chocpkg @@ -86,6 +86,8 @@ configure_for_package() { native) PACKAGE_INSTALL_DIR="$NATIVE_INSTALL_DIR" ;; + package-group) + ;; *) error_exit "Unknown package type $PACKAGE_TYPE" ;; diff --git a/chocpkg/modules/package_group.sh b/chocpkg/modules/package_group.sh index 8b959be..5625686 100644 --- a/chocpkg/modules/package_group.sh +++ b/chocpkg/modules/package_group.sh @@ -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 +} +