Skip to content

Commit

Permalink
[utilities] Fix clearing tracker database. Fixes JB#39110
Browse files Browse the repository at this point in the history
  • Loading branch information
pvuorela committed Jan 30, 2018
1 parent e7a195a commit ecd1c91
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
5 changes: 1 addition & 4 deletions plugin/utiltools.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,9 @@ void UtilTools::cleanRpmDb(QJSValue successCallback, QJSValue errorCallback)
execute(SystemTool, QStringList("repair_rpm_db"), successCallback, errorCallback);
}


void UtilTools::cleanTrackerDb(QJSValue successCallback, QJSValue errorCallback)
{
QStringList arguments;
arguments << "--user" << "start" << "tracker-reindex.service";
execute("systemctl", arguments, successCallback, errorCallback);
execute(SystemTool, QStringList("tracker_reindex"), successCallback, errorCallback);
}

void UtilTools::restartNetwork(QJSValue successCallback, QJSValue errorCallback)
Expand Down
3 changes: 3 additions & 0 deletions tools/sailfish_tools_system_action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ std::map<std::string, action_type> actions = {
}},
{ "restart_network", [](action_ctx const *) {
return execute_own_utility("restart_network.sh");
}},
{ "tracker_reindex", [](action_ctx const *) {
return execute_own_utility("tracker_reindex.sh");
}}
};

Expand Down
2 changes: 1 addition & 1 deletion tools/tracker_reindex.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

tracker reset --hard
tracker reset -y --hard

0 comments on commit ecd1c91

Please sign in to comment.