[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#530904: calls udevinfo which no longer exists



tags 530904 + patch
thanks

On Fri, May 29, 2009 at 09:44:37AM -0300, Otavio Salvador wrote:
> On Thu, May 28, 2009 at 2:52 PM, Martin Michlmayr <tbm@cyrius.com> wrote:
> > Package: partman-target
> > Version: 59
> > Severity: serious
> >
> > finish.d/fstab_removable_media_entries calls udevinfo which no longer
> > exists in udev 0.141-1.
> >
> > In order to find out whether this should be fixed in partman-target or
> > in udev, I grepped through d-i to see who still uses udevinfo.  As it
> > turns out, nobootloader/debian/postinst, debian-installer-utils/list-devices
> > and os-prober/os-prober all check for udevadm and use that when it's
> > available.
> 
> Yes, it needs to be fixed in partman-target.

This fixes it in a way similar to d-i-u/list-devices.

	Max
Index: partman-target/debian/changelog
===================================================================
--- partman-target/debian/changelog	(Revision 58701)
+++ partman-target/debian/changelog	(Arbeitskopie)
@@ -1,5 +1,6 @@
 partman-target (60) UNRELEASED; urgency=low
 
+  [ Colin Watson ]
   * Merge from Ubuntu:
     - Escape spaces, tabs, newlines, and backslashes in fstab according to
       the procedure described in getmntent(3) (LP: #38224).
@@ -16,6 +17,9 @@
   * Fix proper_mountpoints check to cope with mountpoints containing commas.
   * Use block-attr from di-utils 1.68.
 
+  [ Max Vozeler ]
+  * Use udevadm instead of udevinfo if available (closes: #530904).
+
  -- Colin Watson <cjwatson@debian.org>  Fri, 20 Feb 2009 13:20:43 +0000
 
 partman-target (59) unstable; urgency=high
Index: partman-target/finish.d/fstab_removable_media_entries
===================================================================
--- partman-target/finish.d/fstab_removable_media_entries	(Revision 58701)
+++ partman-target/finish.d/fstab_removable_media_entries	(Arbeitskopie)
@@ -93,19 +93,22 @@
 founddevs=
 if [ -d /sys/block ]; then
 	if type udevadm >/dev/null 2>&1; then
-		disk_containing () {
-			dirname "$(udevadm info -q path -n "$dev")"
+		device_info () {
+			udevadm info "$@"
 		}
 	elif type udevinfo >/dev/null 2>&1; then
-		disk_containing () {
-			dirname "$(udevinfo -q path -n "$dev")"
+		device_info () {
+			udevinfo "$@"
 		}
 	fi
 fi
-if type disk_containing >/dev/null 2>&1; then
+if type device_info >/dev/null 2>&1; then
+	disk_containing () {
+		dirname "$(device_info -q path -n "$dev")"
+	}
 	partitions="$(list-devices partition)"
 	for dev in $partitions; do
-		if ! udevinfo -q env -n "$dev" | grep -q '^ID_BUS=usb$'; then
+		if ! device_info -q env -n "$dev" | grep -q '^ID_BUS=usb$'; then
 			continue
 		fi
 		disk="$(disk_containing "$dev")"

Reply to: