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 Jan 7, 2023
1 parent 3e6fa6a commit 9952bdf
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 @@ -211,7 +211,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 9952bdf

Please sign in to comment.