From 4bedde72440835a3f66dc41dbeca0f08d16a3e38 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Fri, 2 Dec 2016 10:27:02 -0500 Subject: [PATCH] Adjust the check for valid pkg repos to better catch when the databases are out of sync and update as needed. --- src/server/library/sysadm-pkg.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/server/library/sysadm-pkg.cpp b/src/server/library/sysadm-pkg.cpp index 21cca54..c740034 100644 --- a/src/server/library/sysadm-pkg.cpp +++ b/src/server/library/sysadm-pkg.cpp @@ -331,11 +331,7 @@ QJsonArray PKG::list_categories(QString repo){ QJsonArray PKG::list_repos(bool updated){ QString dbdir = "/var/db/pkg/repo-%1.sqlite"; QDir confdir("/usr/local/etc/pkg/repos"); - QStringList confs = confdir.entryList(QStringList() << "*.conf", QDir::Files); - if(confs.isEmpty() && !updated){ - QProcess::execute("pkg update"); //need to update pkg configs - return list_repos(true); //try again recursively (will not try to update again) - } + QStringList confs = confdir.entryList(QStringList() << "*.conf", QDir::Files); QStringList found; found << "local"; //There is always a local database (for installed pkgs) for(int i=0; i