Browse code

Remove general assumption in get_packages()

get_packages() always included 'general' as a default 'service' file.
Remove this assumption and add it explicitly to the primary package
installation call. This allows get_package() to be used in other places
where 'general' is not desired to be included.

Change-Id: I1eed4386d073d6ae9534aedae32654208c6662e8

Dean Troyer authored on 2013/10/05 03:33:07
Showing 2 changed files
... ...
@@ -248,7 +248,7 @@ function _get_package_dir() {
248 248
 # - ``# dist:DISTRO`` or ``dist:DISTRO1,DISTRO2`` limits the selection
249 249
 #   of the package to the distros listed.  The distro names are case insensitive.
250 250
 function get_packages() {
251
-    local services=$1
251
+    local services=$@
252 252
     local package_dir=$(_get_package_dir)
253 253
     local file_to_parse
254 254
     local service
... ...
@@ -260,7 +260,7 @@ function get_packages() {
260 260
     if [[ -z "$DISTRO" ]]; then
261 261
         GetDistro
262 262
     fi
263
-    for service in general ${services//,/ }; do
263
+    for service in ${services//,/ }; do
264 264
         # Allow individual services to specify dependencies
265 265
         if [[ -e ${package_dir}/${service} ]]; then
266 266
             file_to_parse="${file_to_parse} $service"
... ...
@@ -55,7 +55,7 @@ export_proxy_variables
55 55
 # ================
56 56
 
57 57
 # Install package requirements
58
-install_package $(get_packages $ENABLED_SERVICES)
58
+install_package $(get_packages general $ENABLED_SERVICES)
59 59
 
60 60
 if [[ -n "$SYSLOG" && "$SYSLOG" != "False" ]]; then
61 61
     if is_ubuntu || is_fedora; then