After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 722629 - optical-media: Implement proper content-changed support
optical-media: Implement proper content-changed support
Status: RESOLVED FIXED
Product: grilo
Classification: Other
Component: plugins
unspecified
Other All
: Normal normal
: ---
Assigned To: grilo-maint
grilo-maint
Depends on:
Blocks:
 
 
Reported: 2014-01-20 18:15 UTC by Bastien Nocera
Modified: 2014-02-06 13:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
optical-media: Handle cancelled retvals like errors (1.18 KB, patch)
2014-01-20 18:15 UTC, Bastien Nocera
none Details | Review
optical-media: Track added media (2.23 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Split up drive detection function (1.79 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Simplify device addition (2.90 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Split out whether to ignore volumes (2.23 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Add ignore_mount() helper (2.93 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Monitor only volumes, with separate callbacks (4.56 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Split out creating the media id (1.84 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Split out setting metadata (2.11 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Add a cancellable for other ops (1.58 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Simplify add_volume() (2.13 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Don't pass browse data to entry_parsed_cb() (1.90 KB, patch)
2014-01-20 18:16 UTC, Bastien Nocera
none Details | Review
optical-media: Implement proper content-changed support (4.74 KB, patch)
2014-01-20 18:17 UTC, Bastien Nocera
none Details | Review
optical-media: Don't pass browse data to entry_parsed_cb() (2.12 KB, patch)
2014-01-20 18:38 UTC, Bastien Nocera
none Details | Review
optical-media: Implement proper content-changed support (4.74 KB, patch)
2014-01-20 18:38 UTC, Bastien Nocera
none Details | Review
optical-media: Implement proper content-changed support (4.77 KB, patch)
2014-01-20 18:47 UTC, Bastien Nocera
none Details | Review
optical-media: Implement proper content-changed support (4.89 KB, patch)
2014-01-21 11:37 UTC, Bastien Nocera
none Details | Review
optical-media: Handle cancelled retvals like errors (1.18 KB, patch)
2014-01-21 15:33 UTC, Bastien Nocera
committed Details | Review
optical-media: Track added media (2.23 KB, patch)
2014-01-21 15:33 UTC, Bastien Nocera
committed Details | Review
optical-media: Add a cancellable for other ops (1.53 KB, patch)
2014-01-21 15:33 UTC, Bastien Nocera
committed Details | Review
optical-media: Don't pass browse data to entry_parsed_cb() (2.12 KB, patch)
2014-01-21 15:33 UTC, Bastien Nocera
committed Details | Review
optical-media: Add support for content-changed (17.05 KB, patch)
2014-01-21 15:33 UTC, Bastien Nocera
committed Details | Review
optical-media: Add start/stop notification changes (4.17 KB, patch)
2014-02-06 13:46 UTC, Juan A. Suarez Romero
committed Details | Review

Description Bastien Nocera 2014-01-20 18:15:29 UTC
Quite tedious, but each patch should be reviewable and commitable separately.
Comment 1 Bastien Nocera 2014-01-20 18:15:53 UTC
Created attachment 266771 [details] [review]
optical-media: Handle cancelled retvals like errors
Comment 2 Bastien Nocera 2014-01-20 18:16:01 UTC
Created attachment 266772 [details] [review]
optical-media: Track added media
Comment 3 Bastien Nocera 2014-01-20 18:16:06 UTC
Created attachment 266773 [details] [review]
optical-media: Split up drive detection function
Comment 4 Bastien Nocera 2014-01-20 18:16:11 UTC
Created attachment 266774 [details] [review]
optical-media: Simplify device addition
Comment 5 Bastien Nocera 2014-01-20 18:16:17 UTC
Created attachment 266776 [details] [review]
optical-media: Split out whether to ignore volumes
Comment 6 Bastien Nocera 2014-01-20 18:16:24 UTC
Created attachment 266777 [details] [review]
optical-media: Add ignore_mount() helper
Comment 7 Bastien Nocera 2014-01-20 18:16:29 UTC
Created attachment 266778 [details] [review]
optical-media: Monitor only volumes, with separate callbacks
Comment 8 Bastien Nocera 2014-01-20 18:16:35 UTC
Created attachment 266779 [details] [review]
optical-media: Split out creating the media id
Comment 9 Bastien Nocera 2014-01-20 18:16:40 UTC
Created attachment 266780 [details] [review]
optical-media: Split out setting metadata
Comment 10 Bastien Nocera 2014-01-20 18:16:48 UTC
Created attachment 266781 [details] [review]
optical-media: Add a cancellable for other ops
Comment 11 Bastien Nocera 2014-01-20 18:16:54 UTC
Created attachment 266782 [details] [review]
optical-media: Simplify add_volume()
Comment 12 Bastien Nocera 2014-01-20 18:16:59 UTC
Created attachment 266783 [details] [review]
optical-media: Don't pass browse data to entry_parsed_cb()
Comment 13 Bastien Nocera 2014-01-20 18:17:06 UTC
Created attachment 266784 [details] [review]
optical-media: Implement proper content-changed support
Comment 14 Bastien Nocera 2014-01-20 18:38:43 UTC
Created attachment 266788 [details] [review]
optical-media: Don't pass browse data to entry_parsed_cb()
Comment 15 Bastien Nocera 2014-01-20 18:38:51 UTC
Created attachment 266789 [details] [review]
optical-media: Implement proper content-changed support
Comment 16 Bastien Nocera 2014-01-20 18:47:22 UTC
Created attachment 266791 [details] [review]
optical-media: Implement proper content-changed support
Comment 17 Bastien Nocera 2014-01-21 11:37:10 UTC
Created attachment 266851 [details] [review]
optical-media: Implement proper content-changed support
Comment 18 Bastien Nocera 2014-01-21 15:33:30 UTC
Created attachment 266884 [details] [review]
optical-media: Handle cancelled retvals like errors
Comment 19 Bastien Nocera 2014-01-21 15:33:35 UTC
Created attachment 266885 [details] [review]
optical-media: Track added media
Comment 20 Bastien Nocera 2014-01-21 15:33:41 UTC
Created attachment 266886 [details] [review]
optical-media: Add a cancellable for other ops
Comment 21 Bastien Nocera 2014-01-21 15:33:46 UTC
Created attachment 266887 [details] [review]
optical-media: Don't pass browse data to entry_parsed_cb()
Comment 22 Bastien Nocera 2014-01-21 15:33:52 UTC
Created attachment 266888 [details] [review]
optical-media: Add support for content-changed

And rework the plugin to handle and monitor mounts rather than
volumes. Even though we'd like to support volumes, it's rather
unnecessary and causes problems:
- physical discs will get mounted anyway, so create a mount
- ISO images, when added, generate volume events that aren't
  easy to process when we're interested in mounts ("added" without a
  mount, "changed" when the mount is added)
- When removing ISO images, the backing loop device might not get
  disconnected, not generating volume events, and when we get mount
  events, it's too late to find the backing volume

All this together means that the the code is barely readable after
all those changes, so here's a chunk of it.
Comment 23 Juan A. Suarez Romero 2014-02-06 13:46:06 UTC
Created attachment 268291 [details] [review]
optical-media: Add start/stop notification changes
Comment 24 Juan A. Suarez Romero 2014-02-06 13:49:18 UTC
commit 95d8544d11b92cd1faa22a35347967bb9c0341c0
Author: Juan A. Suarez Romero <jasuarez@igalia.com>
Date:   Thu Feb 6 14:40:48 2014 +0100

    optical-media: Add start/stop notification changes
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722629

 src/optical-media/grl-optical-media.c | 47 +++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 43 insertions(+), 4 deletions(-)

commit e01be7ecef9fde1f565b17b10f0223bb4d5709c7
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Jan 20 17:21:08 2014 +0100

    optical-media: Add support for content-changed
    
    And rework the plugin to handle and monitor mounts rather than
    volumes. Even though we'd like to support volumes, it's rather
    unnecessary and causes problems:
    - physical discs will get mounted anyway, so create a mount
    - ISO images, when added, generate volume events that aren't
      easy to process when we're interested in mounts ("added" without a
      mount, "changed" when the mount is added)
    - When removing ISO images, the backing loop device might not get
      disconnected, not generating volume events, and when we get mount
      events, it's too late to find the backing volume
    
    All this together means that the the code is barely readable after
    all those changes, so here's a chunk of it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722629

 src/optical-media/grl-optical-media.c | 418 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------
 1 file changed, 269 insertions(+), 149 deletions(-)

commit 762fd61271a982e792e5de718bb2de39cda07923
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Jan 20 19:09:54 2014 +0100

    optical-media: Don't pass browse data to entry_parsed_cb()
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722629

 src/optical-media/grl-optical-media.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

commit c8fdaedb69e733a6fece70e1954bc10714ea48a3
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Jan 20 19:07:37 2014 +0100

    optical-media: Add a cancellable for other ops
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722629

 src/optical-media/grl-optical-media.c | 5 +++++
 1 file changed, 5 insertions(+)

commit c4077cf4421ec5e162f717d86d6acc81eee5679e
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Jan 20 17:05:51 2014 +0100

    optical-media: Track added media
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722629

 src/optical-media/grl-optical-media.c | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

commit 2756ec1f136b23b92b7c3a70d0989c1226314f58
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Jan 20 17:05:08 2014 +0100

    optical-media: Handle cancelled retvals like errors
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722629

 src/optical-media/grl-optical-media.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)