As mentioned in the original report, the *boot? devices apparently
read-only and as such should not be in the list in the first place, so
this fix masks the presumed bug in parted_devices.c:process_device
I don't suppose that it really matters though, since we'll just be left
filtering out a device that should never be listed, but for tidiness
sake this should be removed if parted_devices.c is debugged and fixed.
Also, perhaps the bug should be left open, or a new one opened,
regarding the listing of read-only devices.
---
debian/changelog | 8 ++++++++
init.d/parted | 10 ++++++----
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index ed8ebfa..2e883c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+partman-base (186) UNRELEASED; urgency=low
+
+ * Do not list /dev/mmcblk.(rpmb|boot.) devices, as they cannot be
+ usefully partitioned (Closes: #773229)
+ Prompted by a patch from Tsung-Han Lin <tsung-han.lin@canonical.com>
+
+ -- Philip Hands <phil@hands.com> Tue, 19 May 2015 19:51:33 +0100
+
partman-base (185) unstable; urgency=medium
[ Updated translations ]
diff --git a/init.d/parted b/init.d/parted
index 069cefe..81cdafc 100755
--- a/init.d/parted
+++ b/init.d/parted
@@ -88,10 +88,12 @@ if [ ! -f /var/run/parted_server.pid ]; then
size=$2
model=$3
- # Skip mtd devices since they aren't supported by parted
- if echo $device | grep -q '/dev/mtd'; then
- continue
- fi
+ # Skip mtd (not supported by parted) and mmcblk odities
+ case "${device#/dev/}" in
+ mtd* | mmcblk?rpmb | mmcblk?boot? )
+ continue
+ ;;
+ esac
# Skip MD devices which are not active
if [ -e /proc/mdstat ]; then
--
2.1.4
Attachment:
signature.asc
Description: PGP signature