Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Get the pkg repo detection systems up and running again.
Browse files Browse the repository at this point in the history
  • Loading branch information
beanpole135 committed Oct 4, 2018
1 parent 10d00d9 commit 6949513
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/server/library/sysadm-pkg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,11 +379,13 @@ QJsonArray PKG::list_repos(bool updated){
QDir confdir(repodirs[d]);
QStringList confs = confdir.entryList(QStringList() << "*.conf", QDir::Files);
for(int i=0; i<confs.length(); i++){
QStringList repoinfo = General::readTextFile(confdir.absoluteFilePath(confs[i])).join("\n").split("}");
QStringList repoinfo = General::readTextFile(confdir.absoluteFilePath(confs[i])).join("\n").split("\n}");
for(int j=0; j<repoinfo.length(); j++){
//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"));
//qDebug() << "Checking Repo:" << repo << enabled << isEnabled;
if(QFile::exists(dbdir.arg(repo)) && isEnabled){ found << repo; }
} //loop over repos listed in conf
} //loop over confs in repodir
Expand Down
2 changes: 1 addition & 1 deletion src/server/library/sysadm-update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ QJsonObject Update::startUpdate(QJsonObject jsin) {

//Quick check to ensure the tool is available
QString tool = "/usr/local/bin/pc-updatemanager";
QStringList flags << "pkgupdate";
QStringList flags; flags << "pkgupdate";
if(!QFile::exists(tool)){
return retObject;
}
Expand Down

0 comments on commit 6949513

Please sign in to comment.