[SCM] live-build branch, debian, updated. debian/3.0_a42-1-25-g6c98972

Daniel Baumann daniel at debian.org
Mon Feb 6 22:26:22 UTC 2012


The following commit has been merged in the debian branch:
commit 3004ef6851e591b31026bf1925b2ffeb0f98faf4
Author: Daniel Baumann <daniel at debian.org>
Date:   Mon Feb 6 23:02:06 2012 +0100

    Shortening kernel and initrd filenames in /live again similar to what we did with in lenny.
    
    Unfortunately, syslinux as of wheezy and newer apparently does not support
    long filenames anymore. Therefore, we do have to shorten the filenames
    from:
    
    	/live/vmlinuz-3.2.0-1-amd64
    	/live/initrd.img-3.2.0-1-amd64
    
    to:
    
    	/live/vmlinuz
    	/live/initrd.img
    
    In case more than one kernel flavour is used, the files are being
    numbered, starting with vmlinuz1 and initrd1.img.

diff --git a/scripts/build/lb_binary_syslinux b/scripts/build/lb_binary_syslinux
index c306b22..08d7258 100755
--- a/scripts/build/lb_binary_syslinux
+++ b/scripts/build/lb_binary_syslinux
@@ -170,19 +170,43 @@ esac
 # Configuring files
 if [ -e "${_TARGET}/live.cfg.in" ]
 then
-	# FIXME: only works with one kernel version for the time being
-	for _FLAVOUR in ${LB_LINUX_FLAVOURS}
-	do
-		_VERSION="$(basename binary/live/vmlinuz-*-${_FLAVOUR} -${_FLAVOUR} | sed -e 's|vmlinuz-||')"
-
-		sed -e "s|@FLAVOUR@|${_FLAVOUR}|g" \
-		    -e "s|@KERNEL@|/live/vmlinuz-${_VERSION}-${_FLAVOUR}|g" \
-		    -e "s|@INITRD@|/live/initrd.img-${_VERSION}-${_FLAVOUR}|g" \
-		    -e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
-		"${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
-	done
-
-	rm -f "${_TARGET}/live.cfg.in"
+	# This is all rather suboptimal.. needs prettifying at some point
+	_FLAVOURS="$(echo ${LB_LINUX_FLAVOURS} | wc -w)"
+
+	case "${_FLAVOURS}" in
+		1)
+			mv binary/live/vmlinuz-* binary/live/vmlinuz
+			mv binary/live/initrd.img-* binary/live/initrd.img
+
+			sed -e "s|@FLAVOUR@|${LB_LINUX_FLAVOUR}|g" \
+			    -e "s|@KERNEL@|/live/vmlinuz|g" \
+			    -e "s|@INITRD@|/live/initrd.img|g" \
+			    -e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
+			"${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
+
+			rm -f "${_TARGET}/live.cfg.in"
+			;;
+
+		*)
+			_NUMBER="0"
+
+			for _FLAVOUR in ${LB_LINUX_FLAVOURS}
+			do
+				_NUMBER="$((${_NUMBER} + 1))"
+
+				mv binary/live/vmlinuz-*-${_FLAVOUR} binary/live/vmlinuz${_NUMBER}
+				mv binary/live/initrd.img-*-${_FLAVOUR} binary/live/initrd${_NUMBER}.img
+
+				sed -e "s|@FLAVOUR@|${_FLAVOUR}|g" \
+				    -e "s|@KERNEL@|/live/vmlinuz${_NUMBER}|g" \
+				    -e "s|@INITRD@|/live/initrd${_NUMBER}.img|g" \
+				    -e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \
+				"${_TARGET}/live.cfg.in" >> "${_TARGET}/live.cfg"
+			done
+
+			rm -f "${_TARGET}/live.cfg.in"
+			;;
+	esac
 elif [ -e "${_TARGET}/live.cfg" ]
 then
 	sed -i -e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|g" \

-- 
live-build



More information about the debian-live-changes mailing list