Package: raspi3-firmware
Version: 1.20170317-4

the sort commands utilized for searching the most actual kernel in /etc/kernel/postinst.d/raspi3-firmware are not using option --version-sort. this doesn't work for updates e.g. from 4.9 to 4.12.

a patch to fix this issue is included.
diff --git a/debian/kernel/postinst.d/raspi3-firmware b/debian/kernel/postinst.d/raspi3-firmware
index ca4d158..38cc69d 100755
--- a/debian/kernel/postinst.d/raspi3-firmware
+++ b/debian/kernel/postinst.d/raspi3-firmware
@@ -22,13 +22,13 @@ if ! ischroot; then
   fi
 fi
 
-latest_kernel=$(ls -1 /boot/vmlinuz-* | grep -v '\.dpkg-bak$' | sort -r | head -1)
+latest_kernel=$(ls -1 /boot/vmlinuz-* | grep -v '\.dpkg-bak$' | sort -V -r | head -1)
 if [ -z "$latest_kernel" ]; then
   echo "raspi3-firmware: no kernel found in /boot/vmlinuz-*, cannot populate /boot/firmware"
   exit 0
 fi
 
-latest_initrd=$(ls -1 /boot/initrd.img-* | grep -v '\.dpkg-bak$' | sort -r | head -1)
+latest_initrd=$(ls -1 /boot/initrd.img-* | grep -v '\.dpkg-bak$' | sort -V -r | head -1)
 if [ -z "$latest_initrd" ]; then
   echo "raspi3-firmware: no initrd found in /boot/initrd.img-*, cannot populate /boot/firmware"
   exit 0

Reply via email to