From e5d8c33b817bea9ff58c108af08d4920d2bc5c5a Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Thu, 31 Mar 2016 10:09:37 -0400 Subject: [PATCH] Remove some comments from the pkg interface, and make sure the dispatcher sends out a full update when starting for the first time (in case the proc is a special subsystem process). --- src/server/Dispatcher.cpp | 1 + src/server/library/sysadm-pkg.cpp | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/server/Dispatcher.cpp b/src/server/Dispatcher.cpp index b344a93..1ba7ad0 100644 --- a/src/server/Dispatcher.cpp +++ b/src/server/Dispatcher.cpp @@ -48,6 +48,7 @@ void DProcess::startProc(){ //setup internal connections connect(this, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(cmdFinished(int, QProcess::ExitStatus)) ); connect(this, SIGNAL(error(QProcess::ProcessError)), this, SLOT(cmdError(QProcess::ProcessError)) ); + this->emit ProcUpdate(ID, proclog); } cCmd = cmds.takeFirst(); success = false; //not finished yet diff --git a/src/server/library/sysadm-pkg.cpp b/src/server/library/sysadm-pkg.cpp index 312013b..72067a6 100644 --- a/src/server/library/sysadm-pkg.cpp +++ b/src/server/library/sysadm-pkg.cpp @@ -122,11 +122,9 @@ QJsonObject PKG::pkg_info(QStringList origins, QString repo, QString category, b } //ANNOTATIONS QSqlQuery q2("SELECT tag_id, value_id FROM pkg_annotation WHERE package_id = '"+id+"'"); - QStringList tags, vals; + QStringList tags, vals; //both the value and the variable are id tags to entries in the annotations table. while(q2.next()){ tags << q2.value("tag_id").toString(); vals << q2.value("value_id").toString(); - //include the annotations as base-level fields as well - //info.insert( anno_from_id(q2.value("tag_id").toString()), anno_from_id(q2.value("value_id").toString()) ); } if(!tags.isEmpty()){ annotations_from_ids(tags, vals, &info); } if(!fullresults){ retObj.insert(origin,info); continue; } //skip the rest of the info queries