Package: goobox
Version: 2.0.0-7
Severity: grave

I get the following symptoms: The Goobox window shows the message "Invalid
device", and the following warning is printed:
  ** (goobox:1802): WARNING **: Can't read /proc/scsi/sg/device_strs

It seems Goobox assumes my CD drive is a SCSI drive because of it's
device name /dev/sr0. (It's a plain laptop ATA drive.) Next it goes
looking for that /proc file, and then it gives up when it discovers that
file doesn't exist.

This might be caused by a recent-ish kernel change, I'm pretty sure my
cd was /dev/hda when I installed this system.

I just deleted all the code that looks at the device name, and Goobox
works again for me. Patch attached. I think this won't do much damage
for people who actually have SCSI drives, goobox just won't be able to
retrieve the drive's model name anymore. It will break the "copy cd"
feature on kernel 2.4.

(BTW, the code looks for some file in /proc/ide to get the model name of
ATA device, but that's another directory I don't have here. Another
kernel change?)

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=nl_BE.UTF-8, LC_CTYPE=nl_BE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages goobox depends on:
ii  gconf2                     2.26.2-3      GNOME configuration database syste
ii  gnome-media                2.26.0-2      GNOME media utilities
ii  gstreamer0.10-gnomevfs     0.10.24-2     GStreamer plugin for GnomeVFS
ii  gstreamer0.10-plugins-base 0.10.24-2     GStreamer plugins from the "base" 
ii  libart-2.0-2               2.3.20-2      Library of functions for 2D graphi
ii  libatk1.0-0                1.26.0-1      The ATK accessibility toolkit
ii  libbonobo2-0               2.24.1-1      Bonobo CORBA interfaces library
ii  libbonoboui2-0             2.24.1-1      The Bonobo UI library
ii  libc6                      2.9-26        GNU C Library: Shared libraries
ii  libcairo2                  1.8.8-2       The Cairo 2D vector graphics libra
ii  libdbus-1-3                1.2.16-2      simple interprocess messaging syst
ii  libdbus-glib-1-2           0.82-1        simple interprocess messaging syst
ii  libfontconfig1             2.6.0-4       generic font configuration library
ii  libfreetype6               2.3.9-5       FreeType 2 font engine, shared lib
ii  libgcc1                    1:4.4.1-4     GCC support library
ii  libgconf2-4                2.26.2-3      GNOME configuration database syste
ii  libglade2-0                1:2.6.4-1     library to load .glade files at ru
ii  libglib2.0-0               2.20.5-1      The GLib library of C routines
ii  libgnome2-0                2.26.0-1      The GNOME library - runtime files
ii  libgnomecanvas2-0          2.26.0-1      A powerful object-oriented display
ii  libgnomeui-0               2.24.1-1      The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0             1:2.24.1-4    GNOME Virtual File System (runtime
ii  libgstreamer0.10-0         0.10.24-1     Core GStreamer libraries and eleme
ii  libgtk2.0-0                2.16.6-1      The GTK+ graphical user interface 
ii  libice6                    2:1.0.5-1     X11 Inter-Client Exchange library
ii  libmusicbrainz4c2a         2.1.5-2       Second generation incarnation of t
ii  libnotify1 [libnotify1-gtk 0.4.5-1       sends desktop notifications to a n
ii  liborbit2                  1:2.14.17-0.1 libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0              1.24.5-1      Layout and rendering of internatio
ii  libpopt0                   1.14-4        lib for parsing cmdline parameters
ii  libsm6                     2:1.1.1-1     X11 Session Management library
ii  libstdc++6                 4.4.1-4       The GNU Standard C++ Library v3
ii  libx11-6                   2:1.2.2-1     X11 client-side library
ii  libxml2                    2.7.4.dfsg-2  GNOME XML library

Versions of packages goobox recommends:
ii  dbus-x11                      1.2.16-2   simple interprocess messaging syst
ii  gstreamer0.10-plugins-good    0.10.16-1  GStreamer plugins from the "good" 
ii  yelp                          2.26.0-3   Help browser for GNOME

goobox suggests no packages.

-- no debconf information
--- a/src/cd-drive.c
+++ b/src/cd-drive.c
@@ -870,7 +870,7 @@
 		if (!g_file_get_contents (filename, &line, NULL, NULL) ||
 		    line == NULL) {
 			g_free (filename);
-			return NULL;
+			return g_strdup (cdrom->device);
 		}
 		g_free (filename);
 
@@ -976,16 +976,6 @@
 static char *
 get_cd_device_file (const char *str)
 {
-	char *devname;
-	
-	if (str[0] == 's') {
-		devname = g_strdup_printf ("/dev/scd%c", str[2]);
-		if (g_file_test (devname, G_FILE_TEST_EXISTS)) {
-			g_free (devname);
-			return g_strdup_printf ("scd%c", str[2]);
-		}
-		g_free (devname);
-	}
 	return 	g_strdup (str);
 }
 
@@ -1042,17 +1032,7 @@
 		}
 	}
 
-	/* we only have to check the first char, since only ide or scsi 	
-	 * devices are listed in /proc/sys/dev/cdrom/info. It will always
-	 * be 'h' or 's'
-	 */
 	n_scsi_units = 0;
-	for (i = 0; i < n_cdroms; i++) {
-		if (cdroms[i].device[0] == 's') {
-			cdroms[i].protocol = CD_PROTOCOL_SCSI;
-			n_scsi_units++;
-		}
-	}
 
 	if (n_scsi_units > 0) {
 		/* open /dev/sg0 to force loading of the sg module if not loaded yet */

Reply via email to