| Summary: | MIME type for raw disk images | ||
|---|---|---|---|
| Product: | shared-mime-info | Reporter: | David Zeuthen (not reading bugmail) <zeuthen> |
| Component: | freedesktop.org.xml | Assignee: | Shared Mime Info group <shared_mime_info> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | medium | ||
| Version: | unspecified | ||
| Hardware: | Other | ||
| OS: | All | ||
| Whiteboard: | |||
| i915 platform: | i915 features: | ||
| Attachments: |
Patch
Updated patch Patch v3 |
||
|
Description
David Zeuthen (not reading bugmail)
2013-05-22 02:22:00 UTC
Created attachment 79634 [details] [review] Patch Here's a patch that does this. Thanks for considering. Btw, I've already implemented most of the functionality in Disks for this: https://git.gnome.org/browse/gnome-disk-utility/commit/?id=55ceb75042cb22a041847278aa3aaec9d044b729 With this MIME type, all I really need to add to Disks is a .desktop file with something along these lines _Name=Disk Image Copier Exec=gnome-disks --restore-disk-image %U Icon=drive-removable-media MimeType=application/x-cd-image;application/x-raw-disk-image; Comment on attachment 79634 [details] [review] Patch The original patch is now obsolete as we also want to support compressed disk images. The changes I'd like to see are these https://git.gnome.org/browse/gnome-disk-utility/tree/data/gdu-mimetypes.xml If you think this is a good idea, I'll prepare a patch post-haste. Thanks! Comment on attachment 79634 [details] [review] Patch Review of attachment 79634 [details] [review]: ----------------------------------------------------------------- ::: freedesktop.org.xml.in @@ +1475,5 @@ > <glob pattern="*.dmg"/> > </mime-type> > + <mime-type type="application/x-raw-disk-image"> > + <_comment>raw disk image</_comment> > + <glob pattern="*.img"/> Could that be a parent of the application/x-cd-image mime-type? Can we have test cases for this? And can you please update the git-formatted patch with your latest g-d-u changes? Please see the HACKING file for details about the test suite. (In reply to comment #4) > Comment on attachment 79634 [details] [review] [review] > Patch > > Review of attachment 79634 [details] [review] [review]: > ----------------------------------------------------------------- > > ::: freedesktop.org.xml.in > @@ +1475,5 @@ > > <glob pattern="*.dmg"/> > > </mime-type> > > + <mime-type type="application/x-raw-disk-image"> > > + <_comment>raw disk image</_comment> > > + <glob pattern="*.img"/> > > Could that be a parent of the application/x-cd-image mime-type? What are the implications of doing this? IOW, what will it break. > Can we have test cases for this? > > And can you please update the git-formatted patch with your latest g-d-u > changes? > > Please see the HACKING file for details about the test suite. Will do. (In reply to comment #5) > (In reply to comment #4) > > Comment on attachment 79634 [details] [review] [review] [review] > > Patch > > > > Review of attachment 79634 [details] [review] [review] [review]: > > ----------------------------------------------------------------- > > > > ::: freedesktop.org.xml.in > > @@ +1475,5 @@ > > > <glob pattern="*.dmg"/> > > > </mime-type> > > > + <mime-type type="application/x-raw-disk-image"> > > > + <_comment>raw disk image</_comment> > > > + <glob pattern="*.img"/> > > > > Could that be a parent of the application/x-cd-image mime-type? > > What are the implications of doing this? IOW, what will it break. Nothing should break. It means that g-d-u would show ISO images as being something you can dd to a USB disk as well for example, but still having a separate description. > > Can we have test cases for this? > > > > And can you please update the git-formatted patch with your latest g-d-u > > changes? > > > > Please see the HACKING file for details about the test suite. > > Will do. Note that the generic icon name is wrong. There's a small list of icons at the top of the freedesktop.org.xml.in file that are allowed. Icon themes should gracefully fallback if they can't find an exactly matching icon. Install xmllint and run "make check" (as part of the test suite as well), it should show the errors. Sorry for the delay, my Fedora box stopped working and I've only just got hold of another one. (In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > Comment on attachment 79634 [details] [review] [review] [review] [review] > > > Patch > > > > > > Review of attachment 79634 [details] [review] [review] [review] [review]: > > > ----------------------------------------------------------------- > > > > > > ::: freedesktop.org.xml.in > > > @@ +1475,5 @@ > > > > <glob pattern="*.dmg"/> > > > > </mime-type> > > > > + <mime-type type="application/x-raw-disk-image"> > > > > + <_comment>raw disk image</_comment> > > > > + <glob pattern="*.img"/> > > > > > > Could that be a parent of the application/x-cd-image mime-type? > > > > What are the implications of doing this? IOW, what will it break. > > Nothing should break. It means that g-d-u would show ISO images as being > something you can dd to a USB disk as well for example, but still having a > separate description. Done. > > > > Can we have test cases for this? > > > > > > And can you please update the git-formatted patch with your latest g-d-u > > > changes? > > > > > > Please see the HACKING file for details about the test suite. > > > > Will do. Done. > Note that the generic icon name is wrong. There's a small list of icons at > the top of the freedesktop.org.xml.in file that are allowed. Icon themes > should gracefully fallback if they can't find an exactly matching icon. OK. I'v removed the <generic-icon> tags. Will file a bug against gnome-icon-theme for the icon association (just like for application/x-cd-image). > Install xmllint and run "make check" (as part of the test suite as well), it > should show the errors. Done. Created attachment 83054 [details] [review] Updated patch Here's an updated patch with the changes you requested. Please take another look! Thanks and Cheers! Created attachment 83057 [details] [review] Patch v3 Sorry, I uploaded the wrong patch file missing the third file in the added lines in tests/list. The test suite passes with this one. Thanks for the patch! commit 33bce05a5fed6ca8d85ff4c7e0205c9a1ed32e25 Author: David Zeuthen <zeuthen@gmail.com> Date: Fri Jul 26 12:51:17 2013 -0700 Add MIME types for raw disk images https://bugs.freedesktop.org/show_bug.cgi?id=64845 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.