Skip to content

Commit

Permalink
relax version checking in daemon
Browse files Browse the repository at this point in the history
Contributes-To: sailfishos-patches#322
  • Loading branch information
nephros committed Jul 25, 2023
1 parent a5d57a2 commit 05d932f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/bin/patchmanager-daemon/patchmanagerobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,12 @@ bool PatchManagerObject::makePatch(const QDir &root, const QString &patchPath, Q
json[COMPATIBLE_KEY] = QStringList();
json[ISCOMPATIBLE_KEY] = true;
} else {
json[ISCOMPATIBLE_KEY] = json[COMPATIBLE_KEY].toStringList().contains(m_osRelease);
//json[ISCOMPATIBLE_KEY] = json[COMPATIBLE_KEY].toStringList().contains(m_osRelease);
int pos = m_osRelease.lastIndexOf(QChar('.'));
QString checkRelease = m_osRelease.left(pos);
QStringList filteredList = json[COMPATIBLE_KEY].toStringList().replaceInStrings(QRegExp("\.\d+$"), "");
filteredList.removeDuplicates();
json[ISCOMPATIBLE_KEY] = filteredList.contains(checkRelease);
}
json[CONFLICTS_KEY] = QStringList();
patch = json;
Expand Down

0 comments on commit 05d932f

Please sign in to comment.