Hi,

With Daniel's help i was hacking on live-package to add tasksel
support. It isn't finished but we're almost there. Please review, and
if possible finnish it as you prefer and publish images. I'll be glad
to test them!

regards,
-- stratus
Index: src/config
===================================================================
--- src/config	(revision 413)
+++ src/config	(working copy)
@@ -57,6 +57,9 @@
 # Debian security mirror	(Default: http://security.debian.org/)
 #LIVE_MIRROR_SECURITY="http://security.debian.org/";
 
+# Tasksel
+#LIVE_USE_TASKS=""		(Default: no)
+
 # Packages			(Default: empty)
 #LIVE_PACKAGES=""
 
Index: src/scripts/02defaults.sh
===================================================================
--- src/scripts/02defaults.sh	(revision 413)
+++ src/scripts/02defaults.sh	(working copy)
@@ -248,4 +248,10 @@
 	then
 		LIVE_SOURCE="no"
 	fi
+
+	# Set tasksel usage
+	if [ -z "${LIVE_USE_TASKS}" ]
+	then
+		LIVE_USE_TASKS="no"
+	fi
 }
Index: src/scripts/14chroot.sh
===================================================================
--- src/scripts/14chroot.sh	(revision 413)
+++ src/scripts/14chroot.sh	(working copy)
@@ -111,17 +111,32 @@
 		fi
 
 		# Restore cloned package selection
-		if [ -f "${LIVE_PACAKGE_LIST_CLONED}" ]
+		if [ -f "${LIVE_PACKAGE_LIST_CLONED}" ]
 		then
 			Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST_CLONED}` aptitude install --assume-yes"
 		fi
 
-		# Install packages list
-		if [ -n "${LIVE_PACKAGE_LIST}" ]
+		if [ "${LIVE_USE_TASKS}" = "yes" ]
 		then
-			grep -v "^#" "${LIVE_PACKAGE_LIST}" > "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
-			Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST}` aptitude install --assume-yes"
-			rm -f "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
+			# work around tasksel limitation
+			Chroot_exec "chmod -x /usr/bin/debconf-apt-progress"
+			
+			# FIXME: where's the task list?
+			# kde = desktop, kde-desktop
+			# gnome = desktop, gnome-desktop
+			# xfce (only in tasksel svn but will make etch) = desktop, xfce-desktop
+			Chroot_exec "tasksel install TASKS_NAMES_HERE"
+
+			Chroot_exec "chmod +x /usr/bin/debconf-apt-progress"
+		else
+			# Install packages list
+			if [ -n "${LIVE_PACKAGE_LIST}" ]
+			then
+				grep -v "^#" "${LIVE_PACKAGE_LIST}" > "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
+				Chroot_exec "xargs --arg-file=/root/`basename ${LIVE_PACKAGE_LIST}` aptitude install --assume-yes"
+				rm -f "${LIVE_CHROOT}"/root/"`basename ${LIVE_PACKAGE_LIST}`"
+			fi
+		
 		fi
 
 		# Install extra packages
Index: src/main.sh
===================================================================
--- src/main.sh	(revision 413)
+++ src/main.sh	(working copy)
@@ -91,6 +91,7 @@
 	echo "  --server-path: specifies the netboot server path for chroot."
 	echo "  --templates: specifies location of the templates."
 	echo "  -t, --type: specifies live system type."
+	echo "  --use-tasks: use tasks and not lists."
 	echo "  --with-generic-indices: enables generic debian package indices (default)."
 	echo "  --without-generic-indices: disables generic debian package indices."
 	echo "  --with-recommends: installes recommended packages too."
@@ -164,7 +165,7 @@
 
 Main ()
 {
-	ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,with-generic-indices,without-generic-indices,with-recommends,without-recommends,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "[EMAIL PROTECTED]"`"
+	ARGUMENTS="`getopt --longoptions root:,type:,architecture:,bootappend:,clone:,config:,chroot:,distribution:,filesystem:,flavour:,bootstrap-config:,hook:,include-chroot:,include-image:,kernel:,manifest:,mirror:,mirror-security:,output:,packages:,package-list:,proxy-ftp:,preseed:,proxy-http:,repositories:,section:,server-address:,server-path:,templates:,use-tasks:,with-generic-indices,without-generic-indices,with-recommends,without-recommends,with-source,without-source,help,usage,version --name=${PROGRAM} --options r:t:a:b:c:d:f:k:m:o:p:s:huv --shell sh -- "[EMAIL PROTECTED]"`"
 
 	if [ "${?}" != "0" ]
 	then
@@ -291,6 +292,10 @@
 				LIVE_TEMPLATES="${2}"; shift 2
 				;;
 
+			--use-tasks)
+				LIVE_USE_TASKS="yes"; shift
+				;;
+
 			--with-generic-indices)
 				LIVE_GENERIC_INDICES="yes"; shift
 				;;
_______________________________________________
Debian-live-devel mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/debian-live-devel

Reply via email to