mirror of
https://github.com/outbackdingo/sysadm.git
synced 2026-01-27 02:20:17 +00:00
Reverse the pkg repo enabled logic.
default to enabled, look for no/false section to disable. Seems to fix the issue with a repo config file not including the enabled section at all, but pkg still using it.
This commit is contained in:
@@ -390,7 +390,8 @@ QJsonArray PKG::list_repos(bool updated){
|
||||
qDebug() << "Repoinfo:" << repoinfo[j];
|
||||
QString repo = repoinfo[j].section(":",0,0).simplified();
|
||||
QString enabled = repoinfo[j].section("enabled:",1,-1).section(":",0,0).toLower();
|
||||
bool isEnabled = (enabled.contains("yes") || enabled.contains("true"));
|
||||
bool isEnabled = true;
|
||||
if(enabled.contains("no") || enabled.contains("false")){ isEnabled = false; }
|
||||
qDebug() << "Checking Repo:" << repo << enabled << isEnabled;
|
||||
if(QFile::exists(dbdir.arg(repo)) && isEnabled){ found << repo; }
|
||||
} //loop over repos listed in conf
|
||||
|
||||
Reference in New Issue
Block a user