[Debian-live-changes] r2536 - in dists/trunk/live-helper: debian functions helpers

daniel at alioth.debian.org daniel at alioth.debian.org
Thu Jul 19 22:06:54 UTC 2007


Author: daniel
Date: 2007-07-19 22:06:53 +0000 (Thu, 19 Jul 2007)
New Revision: 2536

Modified:
   dists/trunk/live-helper/debian/control
   dists/trunk/live-helper/functions/package.sh
   dists/trunk/live-helper/helpers/lh_binary_iso
   dists/trunk/live-helper/helpers/lh_binary_memtest
Log:


Modified: dists/trunk/live-helper/debian/control
===================================================================
--- dists/trunk/live-helper/debian/control	2007-07-19 21:49:04 UTC (rev 2535)
+++ dists/trunk/live-helper/debian/control	2007-07-19 22:06:53 UTC (rev 2536)
@@ -11,7 +11,7 @@
 Package: live-helper
 Architecture: all
 Depends: cdebootstrap (>= 0.3.15) | debootstrap (>= 0.3.3.2)
-Suggests: genisoimage, squashfs-tools
+Suggests: genisoimage, grub [amd64 i386], squashfs-tools, syslinux [amd64 i386]
 Conflicts: live-package
 Replaces: live-package
 Provides: make-live

Modified: dists/trunk/live-helper/functions/package.sh
===================================================================
--- dists/trunk/live-helper/functions/package.sh	2007-07-19 21:49:04 UTC (rev 2535)
+++ dists/trunk/live-helper/functions/package.sh	2007-07-19 22:06:53 UTC (rev 2536)
@@ -11,19 +11,21 @@
 
 Check_package ()
 {
-	FILE="${1}"
+	ITEM="${1}"
 	PACKAGE="${2}"
 
 	case "${LH_CHROOT_BUILD}" in
 		enabled)
-			if [ ! -f "${FILE}" ]
+			if [ ! -d "${ITEM}" ] && [ ! -f "${ITEM}" ]
 			then
 				PACKAGES="${PACKAGES} ${PACKAGE}"
 			fi
 			;;
 
 		disabled)
-			if [ ! -f "`echo ${FILE} | sed -e 's/chroot//'`" ]
+			ITEM="`echo ${ITEM} | sed -e 's/chroot//'`"
+
+			if [ ! -d "${ITEM}" ] && [ ! -f "${ITEM}" ]
 			then
 				Echo_error "You need to install ${PACKAGE} on your host system."
 				exit 1

Modified: dists/trunk/live-helper/helpers/lh_binary_iso
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_iso	2007-07-19 21:49:04 UTC (rev 2535)
+++ dists/trunk/live-helper/helpers/lh_binary_iso	2007-07-19 22:06:53 UTC (rev 2536)
@@ -88,9 +88,6 @@
 	GENISOIMAGE_OPTIONS="${GENISOIMAGE_OPTIONS} -V \"${LIVE_ISO_VOLUME}\""
 fi
 
-# Moving image
-mv binary chroot
-
 # Create image
 case "${LIVE_BOOTLOADER}" in
 	grub)
@@ -128,16 +125,27 @@
 		;;
 esac
 
+case "${LH_CHROOT_BUILD}" in
+	enabled)
+		# Moving image
+		mv binary chroot
+
 cat > chroot/binary.sh << EOF
 ${LH_GENISOIMAGE} ${GENISOIMAGE_OPTIONS} -o binary.iso -J -l -cache-inodes binary
 EOF
 
-Chroot "sh binary.sh"
+		Chroot "sh binary.sh"
 
-# Move image
-mv chroot/binary chroot/binary.iso ./
-rm -f chroot/binary.sh
+		# Move image
+		mv chroot/binary chroot/binary.iso ./
+		rm -f chroot/binary.sh
+		;;
 
+	disabled)
+		${LH_GENISOIMAGE} ${GENISOIMAGE_OPTIONS} -o binary.iso -J -l -cache-inodes binary
+		;;
+esac
+
 # Removing depends
 Remove_package
 

Modified: dists/trunk/live-helper/helpers/lh_binary_memtest
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_memtest	2007-07-19 21:49:04 UTC (rev 2535)
+++ dists/trunk/live-helper/helpers/lh_binary_memtest	2007-07-19 22:06:53 UTC (rev 2536)
@@ -57,11 +57,15 @@
 	exit 0
 fi
 
-if [ -f chroot/usr/sbin/grub ] && [ ! -d chroot/boot/grub ]
+if [ "${LH_CHROOT_BUILD}" = "enabled" ]
 then
-	GRUB="yes"
 
-	mkdir -p chroot/boot/grub
+	if [ -f chroot/usr/sbin/grub ] && [ ! -d chroot/boot/grub ]
+	then
+		GRUB="yes"
+
+		mkdir -p chroot/boot/grub
+	fi
 fi
 
 # Checking depends
@@ -121,13 +125,13 @@
 mkdir -p "${DESTDIR}"
 
 # Installing memtest
-case "${LIVE_MEMTEST}" in
-	memtest86)
-		cp -f chroot/boot/memtest86.bin "${DESTDIR}"/memtest
+case "${LH_CHROOT_BUILD}" in
+	enabled)
+		cp -f chroot/boot/${LH_MEMTEST} "${DESTDIR}"/memtest
 		;;
 
-	memtest86+)
-		cp -f chroot/boot/memtest86+.bin "${DESTDIR}"/memtest
+	disabled)
+		cp -f /boot/${LH_MEMTEST} "${DESTDIR}"/memtest
 		;;
 esac
 




More information about the Debian-live-changes mailing list