[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 1/2] Fix helper variable usage



From: Otavio Salvador <otavio@ossystems.com.br>

To allow the usage of variables defined on live-package configuration
by the helpers, we does need to export them. While looking at it some variables were found to be problematic and this patch address it. The changed ones are:

 - LIVE_DISTRIBUTION_EXPERIMENTAL
 - LIVE_KERNEL_PACKAGES
 - LIVE_MIRROR_SECURITY
 - LIVE_PACKAGE_LIST 
 - LIVE_REPOSITORY_KEYRING
 - LIVE_TASKS

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

 src/scripts/02defaults.sh |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/src/scripts/02defaults.sh b/src/scripts/02defaults.sh
index 3960e72..dcf03c5 100644
--- a/src/scripts/02defaults.sh
+++ b/src/scripts/02defaults.sh
@@ -72,10 +72,10 @@ Defaults ()
 	then
 		LIVE_DISTRIBUTION="unstable"
 		LIVE_DISTRIBUTION_EXPERIMENTAL="yes"
-		export LIVE_DISTRIBUTION_EXPERIMENTAL
 	fi
 
 	export LIVE_DISTRIBUTION
+	export LIVE_DISTRIBUTION_EXPERIMENTAL
 
 	# Set bootstrap flavour
 	if [ -z "${LIVE_FLAVOUR}" ]
@@ -170,9 +170,10 @@ Defaults ()
  			LIVE_KERNEL_PACKAGES="${LIVE_KERNEL_PACKAGES} loop-aes-modules-2.6-${LIVE_KERNEL} loop-aes-utils"
  		fi
 
-		export LIVE_KERNEL_PACKAGES
 	fi
 
+	export LIVE_KERNEL_PACKAGES
+
 	# Set debian mirror
 	if [ -z "${LIVE_MIRROR}" ]
 	then
@@ -185,34 +186,35 @@ Defaults ()
 	if [ -z "${LIVE_REPOSITORY_KEYRING}" ]
 	then
 		LIVE_REPOSITORY_KEYRING="debian-archive-keyring"
-		export LIVE_REPOSITORY_KEYRING
 	fi
+	
+	export LIVE_REPOSITORY_KEYRING
 
 	# Set debian security mirror
 	if [ -z "${LIVE_MIRROR_SECURITY}" ]
 	then
 		LIVE_MIRROR_SECURITY="http://security.debian.org/";
-		export LIVE_MIRROR_SECURITY
 	fi
 
+	export LIVE_MIRROR_SECURITY
+
 	# Set default aptitude tasks
 	if [ "${LIVE_PACKAGE_LIST}" = "gnome-desktop" ]
 	then
 		LIVE_PACKAGE_LIST="gnome"
 		LIVE_TASKS="${LIVE_TASKS} standard laptop desktop gnome-desktop"
-		export LIVE_PACKAGE_LIST LIVE_TASKS
 	elif [ "${LIVE_PACKAGE_LIST}" = "kde-desktop" ]
 	then
 		LIVE_PACKAGE_LIST="kde"
 		LIVE_TASKS="${LIVE_TASKS} standard laptop desktop kde-desktop"
-		export LIVE_PACKAGE_LIST LIVE_TASKS
 	elif [ "${LIVE_PACKAGE_LIST}" = "xfce-desktop" ]
 	then
 		LIVE_PACKAGE_LIST="xfce"
 		LIVE_TASKS="${LIVE_TASKS} standard laptop desktop xfce-desktop"
-		export LIVE_PACKAGE_LIST LIVE_TASKS
 	fi
 
+	export LIVE_PACKAGE_LIST LIVE_TASKS
+
 	# Check for package lists
 	if [ -z "${LIVE_PACKAGE_LIST}" ]
 	then
@@ -242,6 +244,11 @@ Defaults ()
 
 	export LIVE_PACKAGE_LIST
 
+	if [ -n "${LIVE_PACKAGES}" ]
+	then
+		export LIVE_PACKAGES
+	fi
+
 	# Set FTP proxy
 	if [ -z "${LIVE_PROXY_FTP}" ] && [ -n "${ftp_proxy}" ]
 	then


Reply to: