Commit 52e8c464 authored by Aard's avatar Aard

[ssu] Allow passing store credential errors down to libzypp

If a device is reasonably broken the UI level might not be available.
Until the updated related components from store are available fully
in middleware this provides a workaround to rescue such devices,
given valid store credentials were written once before
parent 7da8edfa
......@@ -633,6 +633,9 @@ void Ssu::updateCredentials(bool force){
void Ssu::updateStoreCredentials(){
SsuCoreConfig *settings = SsuCoreConfig::instance();
SsuLog *ssuLog = SsuLog::instance();
QDBusMessage message = QDBusMessage::createMethodCall("com.jolla.jollastore",
......@@ -640,7 +643,11 @@ void Ssu::updateStoreCredentials(){
QDBusPendingReply<QString, QString> reply = SsuCoreConfig::userSessionBus().asyncCall(message);
if (reply.isError()) {
setError(QString("Store credentials not received. %1").arg(reply.error().message()));
if (settings->value("ignore-credential-errors").toBool() == true){
ssuLog->print(LOG_WARNING, QString("Warning: ignore-credential-errors is set, passing auth errors down to libzypp"));
ssuLog->print(LOG_WARNING, QString("Store credentials not received. %1").arg(reply.error().message()));
} else
setError(QString("Store credentials not received. %1").arg(reply.error().message()));
} else {
SsuCoreConfig *settings = SsuCoreConfig::instance();
Markdown is supported
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