Restart dmedia-service upon upgrade

Bug #902856 reported by Jason Gerard DeRose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dmedia
Fix Released
High
Jason Gerard DeRose

Bug Description

So this is a somewhat sticky problem that I'm not sure any Debian packaging policy has been developed around yet.

When dmedia is upgraded, we really want to kill the current dmedia-service (assuming it was running), force a restart.

The closest thing I can think of is the way Firefox prompts you to restart... the key thing being that this is a per-user process getting restarted (restarting system-wide stuff is easy, lots of examples to follow there).

Anyway, we'll have to do some research on this, see what DBus folks recommend, what Debian and RPM packaging policy might be out there for this already.

Thanks @robbt for brave testing that brought this issue up!

Related branches

Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Thanks to a tip from Bilal Akhtar, it seems like Pulse Audio might already do something like this, so that's where I'll start the research.

Revision history for this message
dobey (dobey) wrote :

https://launchpad.net/changeup is a solution to exactly this problem, though it is not yet usable, as I haven't really had any time to poke at it further, and so it fell to the back burner. I'll try to look at it again soon.

In the mean time, I think the status quo is acceptable; which is to say "do nothing and require the user to log out/in, or manually restart if they are technical enough to know how" to get new running code. They are going to have to log out and back in, or restart apps, with a large number of updates anyway.

Another useful thing to do, would be to make the dmedia-service be on-demand, rather than running all the time. This way, it will likely not be running if not in use, when an update gets installed. And having it not running forever helps save battery life as well.

Revision history for this message
Manish Sinha (मनीष सिन्हा) (manishsinha) wrote : Re: [Bug 902856] [NEW] Restart dmedia-service upon upgrade

Check zeitgeist source package too. There is a script which restarts the
daemon. Some script named posting (don't remember)

Changed in dmedia:
milestone: 11.12 → 12.01
Changed in dmedia:
milestone: 12.01 → 12.02
Changed in dmedia:
milestone: 12.02 → 12.04
Changed in dmedia:
milestone: 12.04 → 12.05
Changed in dmedia:
milestone: 12.05 → 12.06
Changed in dmedia:
milestone: 12.06 → 12.07
Changed in dmedia:
milestone: 12.07 → 12.08
Changed in dmedia:
assignee: nobody → Jason Gerard DeRose (jderose)
status: Triaged → In Progress
Revision history for this message
Jason Gerard DeRose (jderose) wrote :

Manish,

Thanks for recommending zeitgeist as a reference package for this, it has a simple, effective solution. In the zeitgeist-core.postinst script it does this:

kill -s HUP `pidof -x zeitgeist-daemon` >/dev/null 2>&1 || true

So I'm adding something similar. I'm also adding something to properly shutdown dmedia-service when the package is removed.

Rodney,

What are you thoughts on what will/should happen with ChangeUp? What are the things it does better than the simple (but I'll admit kinda hacky) kill -s HUP approach?

Changed in dmedia:
status: In Progress → Fix Committed
Changed in dmedia:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.