summaryrefslogtreecommitdiff
path: root/src
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
parent46d707eb42974cd9c43af7301b801aa27491f30d (diff)
introduce (var_)TARGET_PACKAGES_EXCLUDE parameters + TARGET_GROUPS incorrect var fix
Diffstat (limited to 'src')
-rw-r--r--src/core/libs/lib-software.sh17
-rw-r--r--src/core/procedures/automatic1
2 files changed, 16 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"
diff --git a/src/core/procedures/automatic b/src/core/procedures/automatic
index b0e327a..58911ff 100644
--- a/src/core/procedures/automatic
+++ b/src/core/procedures/automatic
@@ -99,6 +99,7 @@ worker_package_list ()
{
var_TARGET_PACKAGES=$TARGET_PACKAGES
var_TARGET_GROUPS=$TARGET_GROUPS
+ var_TARGET_PACKAGES_EXCLUDE=$TARGET_PACKAGES_EXCLUDE
[ -z "$var_TARGET_PACKAGES" -a -z "$var_TARGET_GROUPS" ] && var_TARGET_GROUPS=base
}