summaryrefslogtreecommitdiff
path: root/src/core/libs/lib-software.sh
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2009-04-13 22:25:39 +0200
committerDieter Plaetinck <dieter@plaetinck.be>2009-04-13 22:25:39 +0200
commit5ebd3565e58ce30f91bbba9ce5f25871dddcd2e8 (patch)
tree3f09c36763ad76449ccf63073249f64022da00f9 /src/core/libs/lib-software.sh
parent46d707eb42974cd9c43af7301b801aa27491f30d (diff)
introduce (var_)TARGET_PACKAGES_EXCLUDE parameters + TARGET_GROUPS incorrect var fix
Diffstat (limited to 'src/core/libs/lib-software.sh')
-rw-r--r--src/core/libs/lib-software.sh17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh
index 384cab4..c378577 100644
--- a/src/core/libs/lib-software.sh
+++ b/src/core/libs/lib-software.sh
@@ -22,8 +22,21 @@ run_mkinitcpio()
# installpkg(). taken from setup. modified bigtime
# performs package installation to the target system
installpkg() {
- ALL_PACKAGES=$var_TARGET_PACKAGES
- [ -n "$TARGET_GROUPS" ] && ALL_PACKAGES="$ALL_PACKAGES "`list_packages group "$TARGET_GROUPS" | awk '{print $2}'`
+ ALL_PACKAGES=
+ [ -n "$var_TARGET_GROUPS" ] && ALL_PACKAGES=`list_packages group "$var_TARGET_GROUPS" | awk '{print $2}'`
+ if [ -n "$var_TARGET_PACKAGES_EXCLUDE" ]
+ then
+ for excl in $var_TARGET_PACKAGES_EXCLUDE
+ do
+ ALL_PACKAGES=${ALL_PACKAGES//$excl/}
+ done
+ fi
+
+ if [ -n "$var_TARGET_PACKAGES" ]
+ then
+ [ -n "$ALL_PACKAGES" ] && ALL_PACKAGES="$ALL_PACKAGES $var_TARGET_PACKAGES"
+ [ -z "$ALL_PACKAGES" ] && ALL_PACKAGES=$var_TARGET_PACKAGES
+ fi
ALL_PACKAGES=`echo $ALL_PACKAGES`
[ -z "$ALL_PACKAGES" ] && die_error "No packages/groups specified to install"