Update the "pkg update" usage in the system health check. Run the PKG library function to check the repos instead - that one will only do the pkg update if there is some problem with the databases.

This commit is contained in:
Ken Moore
2017-01-20 08:55:37 -05:00
parent b1d8c1f048
commit 3b2ce2ca8e

View File

@@ -10,6 +10,7 @@
#include "library/sysadm-zfs.h"
#include "library/sysadm-update.h"
#include "library/sysadm-systemmanager.h"
#include "library/sysadm-pkg.h"
// === PUBLIC ===
EventWatcher::EventWatcher(){
@@ -404,7 +405,9 @@ void EventWatcher::CheckSystemState(){
obj.insert("updates",updates);
}
//Also start a pkg DB update here - need to make sure this is done regularly in the background rather than make the user wait to use the AppCafe
QProcess::startDetached("pkg update"); //normal DB update check - no need to force rebuild it
if(!sysadm::Update::lastFullCheck().isNull()){ //make sure we have network connection first
sysadm::PKG::list_repos(false); //check/update repo databases
}
// Priority 0-10
obj.insert("priority", DisplayPriority(priority) );