Menu

#32 Would you be willing to add file extraction and listing support to libmirage?

open
nobody
None
unassigned
default
2018-01-15
2018-01-05
i30817
No

It may seem silly to ask for this when you can mount for extraction, but i just spent several hours trying to make the cdemu cmd line tools play nice with udisk2 automounting and came to the conclusion it can't be done. CDemu has no way to specify a mount point that doesn't automount and removing the disc programatically leads to exceptions even with the pyudev module guarding for notifications. Eventually, at least in gnome, after several 'mount/unmount' cycles, the mountpoint stops changing label and then stops reading entirely.

I'd muuuuch prefer that this kernel and distro complication was irrelevant and i could use libmirage tremendous support for multiple formats and just extract files without mounting.

Discussion

  • Henrik Stokseth

    Henrik Stokseth - 2018-01-15

    Dealing with automounting, I found this webpage which seems to address how to prevent this:
    https://askubuntu.com/questions/219796/how-can-i-temporarily-suspend-nautilus-filesystem-automounting-without-making-p#647471
    It should be possible to adapt this to suit your needs by changing driver to vhba and the program to the full path of cdemu daemon executable (or remove this option). type of disk should be "sr" instead of "sd".

    It was decided some time ago that libmirage (cdemu) would not concern itself with filesystems, so this is a feature that won't be added. The rationale is that Linux could handle filesystem access for you.

    If you want to eliminate parts of CDEmu that isn't libmirage that can be done by using libmirage to load an image and then in your program/script write the data from a track to an ISO image. This image could then be either manually mounted loopback on the system or used with tools to extract files from it. Such a 'generic track dumper' utilty could be included with libmirage too, I'm generally positive to that idea.

    I also checked out udisk2, it has a dbus interface running on the system bus. My opinion is that CDEmu shouldn't try to communicate with it, in part because we'd have to deal with root authentication and part because it can be achieved through udev rules. I also suspect that it may not be possible to prevent the mounting in advance, only to deal with it after the fact.

     
  • Mike Frysinger

    Mike Frysinger - 2018-01-15

    might be better to try asking the libarchive guys about adding reading support for these formats as it'd get you tools/UI on top for free. they already support ISO9660 & UDF.

     

Log in to post a comment.