mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 02:20:17 +00:00
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.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user