[SCM] debian-live branch, master, updated. 1.0_a48-1-98-gea96223

Daniel Baumann daniel at debian.org
Sat Aug 23 22:49:19 UTC 2008


The following commit has been merged in the master branch:
commit 5fdd5725304967957b0a40356bb3edb7cfad80cc
Author: Chris Lamb <chris at chris-lamb.co.uk>
Date:   Thu Jul 31 17:12:06 2008 +0100

    Add lh_chroot_local-patches helper to apply local patches against chroot.
    
    Signed-off-by: Chris Lamb <chris at chris-lamb.co.uk>

diff --git a/helpers/lh_chroot b/helpers/lh_chroot
index 7dee5b3..7a527be 100755
--- a/helpers/lh_chroot
+++ b/helpers/lh_chroot
@@ -54,6 +54,7 @@ lh_chroot_local-packages ${*}
 lh_chroot_install-packages ${*}
 lh_chroot_localization ${*}
 lh_chroot_local-includes ${*}
+lh_chroot_local-patches ${*}
 lh_chroot_sysvinit ${*}
 lh_chroot_local-hooks ${*}
 lh_chroot_hooks ${*}
diff --git a/helpers/lh_chroot_tasks b/helpers/lh_chroot_local-patches
similarity index 60%
copy from helpers/lh_chroot_tasks
copy to helpers/lh_chroot_local-patches
index 9d3a15b..caa6180 100755
--- a/helpers/lh_chroot_tasks
+++ b/helpers/lh_chroot_local-patches
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# lh_chroot_tasks(1) - install tasks into chroot
+# lh_chroot_local-patches(1) - apply local patches against chroot
 # Copyright (C) 2006-2008 Daniel Baumann <daniel at debian.org>
 #
 # live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
@@ -18,7 +18,7 @@ do
 done
 
 # Setting static variables
-DESCRIPTION="install tasks into chroot"
+DESCRIPTION="apply local patches against chroot"
 HELP=""
 USAGE="${PROGRAM} [--force]"
 
@@ -28,13 +28,13 @@ Arguments "${@}"
 Read_conffile config/all config/common config/bootstrap config/chroot config/binary config/source
 Set_defaults
 
-Echo_message "Begin installing tasks..."
+Echo_message "Begin applying chroot local patches..."
 
 # Requiring stage file
 Require_stagefile .stage/bootstrap
 
 # Checking stage file
-Check_stagefile .stage/chroot_tasks
+Check_stagefile .stage/chroot_local-patches
 
 # Checking lock file
 Check_lockfile .lock
@@ -42,38 +42,22 @@ Check_lockfile .lock
 # Creating lock file
 Create_lockfile .lock
 
-if [ -n "${LH_TASKS}" ] && [ "${LH_TASKS}" != "none" ]
+if ls -A config/chroot_local-patches/ | grep -qs .
 then
 	# Restoring cache
 	Restore_cache cache/packages_chroot
 
 	# Checking depends
-	case "${LH_TASKSEL}" in
-		aptitude)
-			Check_package chroot/usr/bin/aptitude aptitude
-			;;
-
-		tasksel)
-			Check_package chroot/usr/bin/tasksel tasksel
-			;;
-	esac
+	Check_package chroot/usr/bin/patch patch
 
 	# Installing depends
 	Install_package
 
-	# Installing tasks
-	case "${LH_TASKSEL}" in
-		aptitude)
-			Chroot "aptitude ${APTITUDE_OPTIONS} install ${LH_TASKS}"
-			;;
-
-		tasksel)
-			for TASK in ${LH_TASKS}
-			do
-				Chroot "tasksel --debconf-apt-progress --logstderr install ${TASK}"
-			done
-			;;
-	esac
+	for PATCH in config/chroot_local-patches/*
+	do
+		Echo_message "Applying patch ${PATCH}..."
+		Chroot "patch -p1" < ${PATCH}
+	done
 
 	# Removing depends
 	Remove_package
@@ -82,5 +66,5 @@ then
 	Save_cache cache/packages_chroot
 
 	# Creating stage file
-	Create_stagefile .stage/chroot_tasks
+	Create_stagefile .stage/chroot_local-patches
 fi
diff --git a/helpers/lh_config b/helpers/lh_config
index 310c7ca..3d09aba 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -874,6 +874,7 @@ EOF
 mkdir -p config/chroot_apt
 mkdir -p config/chroot_local-hooks
 mkdir -p config/chroot_local-includes
+mkdir -p config/chroot_local-patches
 mkdir -p config/chroot_local-packages
 mkdir -p config/chroot_local-packageslists
 mkdir -p config/chroot_local-preseed

-- 
debian-live



More information about the debian-live-changes mailing list