Bug#704571: live-build: updated patch and verified
Package: live-build
Version: 3.0.1-1
Followup-For: Bug #704571
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
This is the updated patch which I verified that works with the
parameters shown in the report of this bug, but it will required a minor
change (like: vmlinuz-*-$VAR to be vmlinuz-*$VAR), otherwise it doesn't
works with the flavour 3.8 from the previous example.
I verified it in a build and it worked and boots correctly with all the
flavours
- -- Package-specific info:
- -- System Information:
Debian Release: 7.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=es_ES.UTF-8, LC_CTYPE=es_ES.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages live-build depends on:
ii debootstrap 1.0.44
Versions of packages live-build recommends:
ii cpio 2.11+dfsg-0.1
ii gnu-fdisk 1.2.4-3.1
ii live-boot-doc 3.0.1-1
ii live-config-doc 3.0.21-1
ii live-manual-html [live-manual] 1:3.0.1-1
Versions of packages live-build suggests:
ii debian-keyring 2012.11.15
ii dosfstools 3.0.13-1
ii fakeroot 1.18.4-2
ii git 1:1.7.10.4-1+wheezy1
ii gpgv 1.4.12-7
pn loadlin <none>
ii memtest86+ 4.20-1.1
ii mtools 4.0.17-1
ii parted 2.3-12
ii squashfs-tools 1:4.2-5
ii sudo 1.8.5p2-1+nmu1
ii syslinux 2:4.05+dfsg-6+deb7u1
ii uuid-runtime 2.20.1-5.3
pn win32-loader <none>
ii xorriso 1.2.2-2
- -- no debconf information
- -- debsums errors found:
debsums: changed file /usr/lib/live/build/binary_syslinux (from live-build package)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAEBCAAGBQJRW6sjAAoJEKLHmb/f+NfCh9oP/RDJ27UfQhkYrbPAYLTsO5jt
+CIs/o8fhgml2wTrbdusnH5ODSa0cVDo2dGamlgF7mSZ1NZrNxdOHWqO015kmWvl
ubE0pXlYKP/X96dA7m+vZXNJeVwEHxF459aiISxQRbcsJQy7Ceul1M1Mb+0JTDDH
IlKEqnDo9k9hPFb7EiUhmrLQiPPYLUKnbUIOzgtFswKhtfX6QT6sb4ApkD2GUjU+
hxEUB0bzr8wErUzuWrB2ec3blN05OpjelFh7YJdXNn+51KFK1SITAbb2J05LzzYY
Vet2ocBT3Sq0LMXNNng9CN7tE7T/RIEJ0/FpsP8agPLltV2maXuMjq1pw24oU7Wj
ntbVjzOPdm8/SBRVaKwZawlhVSmuxo2Txqa4IPv3ZG1WBmWMY4dctSe4Y2VStViT
DFFFz/zPkr6Of9Hdaxn9sXq4mjplbZItOGSgUXvorepGI3EL9jaPGAStcT2JWL7w
dES1F8zCeOOnKXvYdOVz4KL581p+k2lJHuebnJlaQgvsv5tr77Z/qDaW2AUc+/QF
TXC/gmEQclfbqAYhxGfdoDzVslh4eQiy73ANAvm4AEo5oMpjb7MV+qPaPxSwtUNV
klJXu3rfhytA+lzOEe882Kz20NftGMEfc2K6//aZVLJz53EB/3YFLIDJXKoqCWeF
/rJeYYE6mBTVEqKQVJSr
=1pH0
-----END PGP SIGNATURE-----
--- a/scripts/build/binary_syslinux
+++ b/scripts/build/binary_syslinux
@@ -185,12 +185,21 @@ then
*)
_NUMBER="0"
- for _FLAVOUR in ${LB_LINUX_FLAVOURS}
+ # this "for" uses a sorting by lenght and adds an indexed order
+ # example:
+ # - if we have: "686-pae 486 3.8-trunk-686-pae", we got this list:
+ # 3.8-trunk-686-pae:3
+ # 686-pae:1
+ # 486:2
+
+ for _FLAVOUR_INDEXED in $( echo "$LB_LINUX_FLAVOURS" | tr ' ' '\n' | awk '{ printf "%d:%s:%d\n", length($0), $0, NR;}' | sort -rn | sed 's/^[0-9]*://' )
do
+ _FLAVOUR="$(echo "${_FLAVOUR_INDEXED}" | sed 's|:.*$||g' )"
+ _INDEX="$(echo "${_FLAVOUR_INDEXED}" | sed 's|^.*:||g' )"
_NUMBER="$((${_NUMBER} + 1))"
- mv binary/live/vmlinuz-*-${_FLAVOUR} binary/live/vmlinuz${_NUMBER}
- mv binary/live/initrd.img-*-${_FLAVOUR} binary/live/initrd${_NUMBER}.img
+ mv binary/live/vmlinuz-*${_FLAVOUR} binary/live/vmlinuz${_INDEX}
+ mv binary/live/initrd.img-*${_FLAVOUR} binary/live/initrd${_INDEX}.img
if [ "${_NUMBER}" -gt 1 ]
then
@@ -201,8 +210,8 @@ then
fi
sed -i -e "s|@FLAVOUR@|${_FLAVOUR}|g" \
- -e "s|@LINUX@|/live/vmlinuz${_NUMBER}|g" \
- -e "s|@INITRD@|/live/initrd${_NUMBER}.img|g" \
+ -e "s|@LINUX@|/live/vmlinuz${_INDEX}|g" \
+ -e "s|@INITRD@|/live/initrd${_INDEX}.img|g" \
-e "s#@APPEND_LIVE@#${LB_BOOTAPPEND_LIVE}#g" \
-e "s#@APPEND_LIVE_FAILSAFE@#${LB_BOOTAPPEND_LIVE_FAILSAFE}#g" \
"${_TARGET}/live.cfg"
Reply to: