From dfb6e1b6a6cb222d00467a0fed6bf84cdc7db2db Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 28 Apr 2017 09:40:38 -0400 Subject: [PATCH] Move the pkg update routine in SysAdm to the pkg queue in the dispatcher so that it does not conflict with other possible pkg commands that get started soon after. --- src/server/library/sysadm-pkg.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/server/library/sysadm-pkg.cpp b/src/server/library/sysadm-pkg.cpp index c740034..32d200e 100644 --- a/src/server/library/sysadm-pkg.cpp +++ b/src/server/library/sysadm-pkg.cpp @@ -343,7 +343,8 @@ QJsonArray PKG::list_repos(bool updated){ } if(found.length()<2 && !updated){ //Only the local repo could be found - update the package repos and try again - QProcess::execute("pkg update"); + DProcess* proc = DISPATCHER->queueProcess(Dispatcher::PKG_QUEUE, "internal_sysadm_pkg_repo_update_sync", "pkg update"); + proc->waitForFinished(); return list_repos(true); //try again recursively (will not try to update again) } return QJsonArray::fromStringList(found);