Merge lp:~mhr3/unity/fix-947301 into lp:unity

Proposed by Michal Hruby
Status: Merged
Approved by: Gord Allott
Approved revision: no longer in the source branch.
Merged at revision: 2080
Proposed branch: lp:~mhr3/unity/fix-947301
Merge into: lp:unity
Diff against target: 69 lines (+20/-5)
4 files modified
UnityCore/HomeLens.cpp (+2/-2)
UnityCore/Lens.cpp (+2/-2)
manual-tests/Lenses.txt (+15/-0)
plugins/unityshell/src/LensView.cpp (+1/-1)
To merge this branch: bzr merge lp:~mhr3/unity/fix-947301
Reviewer Review Type Date Requested Status
Mirco Müller (community) Approve
Gord Allott (community) Approve
Review via email: mp+95957@code.launchpad.net

Description of the change

== The Problem ==
Crashed lens doesn't restart unless searching in home view.

== The Solution ==
Make sure a Search call can restart a lens just as GlobalSearch can.

== Testing ==
Added a manual test for the issue.

To post a comment you must log in.
Revision history for this message
Gord Allott (gordallott) wrote :

works but killall unity-applications-daemon won't work for precice unity, killall can't find it. requires
killall /usr/lib/unity-lens-applications/unity-applications-daemon

so the manual test needs to be fixed up

review: Needs Fixing
Revision history for this message
Gord Allott (gordallott) wrote :

+1

review: Approve
Revision history for this message
Mirco Müller (macslow) wrote :

I've been able to reproduce your manual-test, but on my system I've to use:

  killall unity-applicati

The reason for this truncated process-name currently escapes me. If I do the stated:

  killall unity-applications-daemon

... I get the response that a process with that name could not be found. Any idea?

Revision history for this message
Mirco Müller (macslow) wrote :

Since this seems to be a current (but odd) feature of Precise and not only happening on my system I'm good with approving your branch.

review: Approve
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

I always use pkill instead of killall. Just 'pkill -f
unity-applications-daemon'. That definitely works. This reminds me
that we should really add a --replace switch to all dameons. Oh, have
I missed that a gajillion times or more!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'UnityCore/HomeLens.cpp'
2--- UnityCore/HomeLens.cpp 2012-01-26 08:20:58 +0000
3+++ UnityCore/HomeLens.cpp 2012-03-06 13:23:18 +0000
4@@ -770,7 +770,7 @@
5 if (running_searches_ <= 0)
6 {
7 owner_->search_finished.emit(Hints());
8- LOG_DEBUG(logger) << "Search finished";
9+ LOG_INFO(logger) << "Search finished";
10 }
11 });
12
13@@ -911,7 +911,7 @@
14 {
15 if (lens->search_in_global())
16 {
17- LOG_DEBUG(logger) << " - Global search on '" << lens->id() << "' for '"
18+ LOG_INFO(logger) << " - Global search on '" << lens->id() << "' for '"
19 << search_string << "'";
20 lens->view_type = ViewType::HOME_VIEW;
21 lens->GlobalSearch(search_string);
22
23=== modified file 'UnityCore/Lens.cpp'
24--- UnityCore/Lens.cpp 2012-02-04 05:28:23 +0000
25+++ UnityCore/Lens.cpp 2012-03-06 13:23:18 +0000
26@@ -456,9 +456,9 @@
27 {
28 LOG_DEBUG(logger) << "Searching '" << id_ << "' for '" << search_string << "'";
29
30- if (!proxy_->IsConnected())
31+ if (proxy_ == NULL)
32 {
33- LOG_DEBUG(logger) << "Skipping search. Proxy not connected. ('" << id_ << "')";
34+ LOG_DEBUG(logger) << "Skipping search. Proxy not initialized. ('" << id_ << "')";
35 return;
36 }
37
38
39=== added file 'manual-tests/Lenses.txt'
40--- manual-tests/Lenses.txt 1970-01-01 00:00:00 +0000
41+++ manual-tests/Lenses.txt 2012-03-06 13:23:18 +0000
42@@ -0,0 +1,15 @@
43+Restarting of crashed lenses
44+----------------------------
45+This test makes sure that if a lens crashes, searching in the dash
46+automatically restarts it.
47+
48+#. Open a terminal
49+#. Make sure there are some results in the apps lens
50+#. Kill the applications lens daemon in the terminal
51+ `killall /usr/lib/unity-lens-applications/unity-applications-daemon`
52+#. Open the dash and search for something (for example "gedit")
53+
54+Outcome
55+Applications lens should automatically restart and gedit should be visible
56+in the results.
57+
58
59=== modified file 'plugins/unityshell/src/LensView.cpp'
60--- plugins/unityshell/src/LensView.cpp 2012-02-21 20:10:05 +0000
61+++ plugins/unityshell/src/LensView.cpp 2012-03-06 13:23:18 +0000
62@@ -402,7 +402,7 @@
63 if (view_type != HIDDEN && initial_activation_)
64 {
65 /* We reset the lens for ourselves, in case this is a restart or something */
66- lens_->Search("");
67+ lens_->Search(search_string);
68 initial_activation_ = false;
69 }
70