Commit e5e1173a authored by Nate Graham's avatar Nate Graham
Browse files

Show an Arch-specific message if no app backends are available

Arch developers have repeatedly expressed a preference for Arch users to
use the command line to manage software, rather than Discover. For this
reason, they deliberately package Discover in such a way that you will
have to go out of your way to figure out how to install an app backend.

Unfortunately, this means that Discover looks broken if you install it
with its default set of dependencies, because it won't be able to find
any apps. Novice Arch users don't understand that this is a deliberate
packaging choice in Arch, and instead blame Discover.

To alleviate this, we have introduced an error page that has become
ever mode specific over time about what exactly the problem is. Despite
this, novice Arch users remain confused about it. And the text we show
today is not really correct, as it implies that the issue is caused by
a bug in Arch's packaging. But it is *not* a bug; Arch packagers
package Discover this way deliberately, because they don't want Arch
users to use Discover to get apps. They consider this to be an expert
level feature that you shouldn't use unless you know what you're doing,
which inherently conflicts with the UX that we want to offer in

Accordingly, for Arch users, let's show an Arch-specific message that
explains what's going on in clear and precise language, and offers an
actionable path forward.
parent df120641
Pipeline #180928 passed with stage
in 57 seconds
......@@ -150,12 +150,32 @@ DiscoverObject::DiscoverObject(CompactMode mode, const QVariantMap &initialPrope
found |= b->hasApplications();
if (!found) {
const QString errorText = i18n("Discover currently cannot be used to install "
"any apps because none of its app backends are available.");
const QString errorExplanation;
const QString buttonIcon = QStringLiteral("tools-report-bug");
const QString buttonText = i18n("Report This Issue");
const QString buttonUrl = KOSRelease().bugReportUrl();
QString errorText = i18n(
"Discover currently cannot be used to install any apps or "
"perform system updates because none of its app backends are "
QString errorExplanation = xi18nc("@info",
"You can install some on the Settings page, under the "
"<interface>Missing Backends</interface> section.<nl/><nl/>"
"Also please consider reporting this as a packaging issue to "
"your distribution.");
QString buttonIcon = QStringLiteral("tools-report-bug");
QString buttonText = i18n("Report This Issue");
QString buttonUrl = KOSRelease().bugReportUrl();
if (KOSRelease().name().contains(QStringLiteral("Arch Linux"))) {
errorExplanation = xi18nc("@info",
"You can use <command>pacman</command> to "
"install the optional dependencies that are needed to "
"enable the application backends.<nl/><nl/>Please note "
"that Arch Linux developers recommend using "
"<command>pacman</command> for managing software because "
"the PackageKit backend is not well-integrated on Arch "
buttonIcon = QStringLiteral("help-about");
buttonText = i18n("Learn More");
buttonUrl = KOSRelease().supportUrl();
Q_EMIT openErrorPage(errorText, errorExplanation, buttonText, buttonIcon, buttonUrl);
......@@ -202,7 +202,7 @@ Kirigami.ApplicationWindow
anchors.centerIn: parent
width: parent.width - (Kirigami.Units.largeSpacing * 8)
visible: page.errorMessage !== "" "dialog-error" "emblem-warning"
text: page.errorMessage
explanation: page.errorExplanation
helpfulAction: Kirigami.Action {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment