Make sure to lookup only "apism", not the new "apism-tools"

This commit is contained in:
Gerhard Hoffmann 2024-02-02 08:18:13 +01:00
parent 123f22cd21
commit 44c2820130

View File

@ -1030,7 +1030,7 @@ QString Worker::getATBUpdateToolYoctoVersion() {
QString Worker::getAPISMYoctoVersion() { QString Worker::getAPISMYoctoVersion() {
if (QFile::exists("/var/lib/opkg/status")) { if (QFile::exists("/var/lib/opkg/status")) {
QString const cmd = QString("echo -n $(cat /var/lib/opkg/status | grep -A1 apism | tail -n 1 | cut -d':' -f2 | cut -d' ' -f2)"); QString const cmd = QString("echo -n $(cat /var/lib/opkg/status | grep -A1 -e apism[[:space:]]*$ | tail -n 1 | cut -d':' -f2 | cut -d' ' -f2)");
Command c("bash"); Command c("bash");
if (c.execute("/tmp", QStringList() << "-c" << cmd)) { if (c.execute("/tmp", QStringList() << "-c" << cmd)) {
return c.getCommandResult(); // 1.4.1.0-r4 return c.getCommandResult(); // 1.4.1.0-r4