rlishtaba / rubyripper

Automatically exported from code.google.com/p/rubyripper
0 stars 0 forks source link

rubyripper 0.7.0a (master branch) fails to detect CDs in FreeBSD #480

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The current master branch of rubyripper fails to detect inserted CDs in 
FreeBSD.  There are two reasons for this:

1. Ruby 1.9 in FreeBSD runs csh as its internal shell for executing backticks 
(See Issue 479)
2. FreeBSD considers devices such as CD-ROM drives, hard drives, and other such 
devices to be character devices (like /dev/tty*) rather than block devices.  
Since rubyripper tests to ensure that any CD-ROM device is a block device, it 
will never actually be able to correctly detect inserted discs on FreeBSD.

I've attached a patch for the latter bug, which simply adds an extra test to 
ensure that the OS is not FreeBSD before it tests whether the CD-ROM device 
file is a block device.

Original issue reported on code.google.com by comradec...@gmail.com on 16 Oct 2011 at 7:00

Attachments:

GoogleCodeExporter commented 8 years ago
This is fixed with commit:
http://code.google.com/p/rubyripper/source/detail?r=8595c984ac014f5256d20fd87183
1a7b079aaa41

Original comment by boukewou...@gmail.com on 17 Oct 2011 at 7:09

GoogleCodeExporter commented 8 years ago
With respect to issue 2 (block devices), there is still an assumption that the 
disc device is a symlink or a block device in 
CheckConfigBeforeRipping.checkDevice().

This should probably be changed to:

1. Resolve any symlinks to make sure that it...
2. Is a character device or a block device (Again, don't know how other OS's 
behave, but it should be a chardev on FreeBSD or a blockdev on Linux)

I'll see what I can do about making a patch in the next few days.

Original comment by comradec...@gmail.com on 31 Oct 2011 at 3:07

GoogleCodeExporter commented 8 years ago
I've attached a patch to fix this by simply referencing PermissionDrive in 
CheckConfigBeforeRipping.checkDevice().  Right now, I pass an empty query 
string as the second argument, so permissions won't be checked on the generic 
device, but it should behave identical to (actually, better than) the existing 
code.

Original comment by comradec...@gmail.com on 1 Nov 2011 at 2:16

Attachments:

GoogleCodeExporter commented 8 years ago
I removed the check for the device. This is already done while scanning the 
disc. And it seems to me like a bit too much to do it again before ripping. 
Only scenario that would benefit is in case user sets his drive to a 
non-existing device, after scanning the disc. That seems a bit unlikely to me. 
And he gets an error anyhow as soon as Cdparanoia starts the ripping.

Original comment by boukewou...@gmail.com on 5 Nov 2011 at 9:55