Make sure MX Package Installer doesn't assume incorrect Debian version in the case of a defect
Posted: Tue Jun 17, 2025 1:51 pm
Now that MX-25 is nearing, I recalled this detail that you might want to check:
In the case of an unidentified version string (or not being able to read it in the first place), MX Package Installer defaults to Bullseye also on MX-23. It would be nicer if it defaulted to the current / correct version, along with an indication that this has taken place.
Search for "bullseye" in mainwindow.cpp, which contains default returns like:
In most cases, there is probably something more seriously wrong with the system if the version name doesn't match with any of the ones provided, so a properly serious confirmation dialog when default returning anything seems like a good idea. In any case, return the one used as the base for the current / currently running MX version (the latter would need a bit more version checking under the hood, or having the return distinct in each Package Installer available for currently supported major MX versions).
In the case of an unidentified version string (or not being able to read it in the first place), MX Package Installer defaults to Bullseye also on MX-23. It would be nicer if it defaulted to the current / correct version, along with an indication that this has taken place.
Search for "bullseye" in mainwindow.cpp, which contains default returns like:
Code: Select all
QString MainWindow::getDebianVerName()
{
const auto version = getDebianVerNum();
static const std::map<uchar, QString> versionMap
= {{Release::Jessie, QStringLiteral("jessie")}, {Release::Stretch, QStringLiteral("stretch")},
{Release::Buster, QStringLiteral("buster")}, {Release::Bullseye, QStringLiteral("bullseye")},
{Release::Bookworm, QStringLiteral("bookworm")}, {Release::Trixie, QStringLiteral("trixie")}};
if (const auto it = versionMap.find(version); it != versionMap.end()) {
return it->second;
}
qWarning() << "Error: Invalid Debian version, assumes Bullseye";
return QStringLiteral("bullseye");
}