63 lines
2.9 KiB
Diff
63 lines
2.9 KiB
Diff
|
From 554e9b6b2f7317ca431691e887dc6ffda5b7deb5 Mon Sep 17 00:00:00 2001
|
||
|
From: Richard Hughes <richard@hughsie.com>
|
||
|
Date: Fri, 4 Oct 2024 15:45:46 +0100
|
||
|
Subject: [PATCH] FwupdBackend: Do not use more API now removed in fwupd 2.0.0
|
||
|
|
||
|
---
|
||
|
libdiscover/backends/FwupdBackend/FwupdResource.cpp | 1 -
|
||
|
libdiscover/backends/FwupdBackend/FwupdResource.h | 6 ------
|
||
|
libdiscover/backends/FwupdBackend/FwupdTransaction.cpp | 4 ----
|
||
|
3 files changed, 11 deletions(-)
|
||
|
|
||
|
diff --git a/libdiscover/backends/FwupdBackend/FwupdResource.cpp b/libdiscover/backends/FwupdBackend/FwupdResource.cpp
|
||
|
index 7c18a7d56..daf2bf5ae 100644
|
||
|
--- a/libdiscover/backends/FwupdBackend/FwupdResource.cpp
|
||
|
+++ b/libdiscover/backends/FwupdBackend/FwupdResource.cpp
|
||
|
@@ -173,7 +173,6 @@ void FwupdResource::setReleaseDetails(FwupdRelease *release)
|
||
|
void FwupdResource::setDeviceDetails(FwupdDevice *dev)
|
||
|
{
|
||
|
m_isLiveUpdatable = fwupd_device_has_flag(dev, FWUPD_DEVICE_FLAG_UPDATABLE);
|
||
|
- m_isOnlyOffline = fwupd_device_has_flag(dev, FWUPD_DEVICE_FLAG_ONLY_OFFLINE);
|
||
|
m_needsReboot = fwupd_device_has_flag(dev, FWUPD_DEVICE_FLAG_NEEDS_REBOOT);
|
||
|
|
||
|
if (fwupd_device_get_name(dev)) {
|
||
|
diff --git a/libdiscover/backends/FwupdBackend/FwupdResource.h b/libdiscover/backends/FwupdBackend/FwupdResource.h
|
||
|
index a75f6ab89..c3230303a 100644
|
||
|
--- a/libdiscover/backends/FwupdBackend/FwupdResource.h
|
||
|
+++ b/libdiscover/backends/FwupdBackend/FwupdResource.h
|
||
|
@@ -102,11 +102,6 @@ class FwupdResource : public AbstractResource
|
||
|
return m_isDeviceLocked;
|
||
|
}
|
||
|
|
||
|
- bool isOnlyOffline() const
|
||
|
- {
|
||
|
- return m_isOnlyOffline;
|
||
|
- }
|
||
|
-
|
||
|
bool isLiveUpdatable() const
|
||
|
{
|
||
|
return m_isLiveUpdatable;
|
||
|
@@ -146,7 +141,6 @@ class FwupdResource : public AbstractResource
|
||
|
|
||
|
QString m_updateURI;
|
||
|
bool m_isDeviceLocked = false; // True if device is locked!
|
||
|
- bool m_isOnlyOffline = false; // True if only offline updates
|
||
|
bool m_isLiveUpdatable = false; // True if device is live updatable
|
||
|
bool m_needsReboot = false; // True if device needs Reboot
|
||
|
QString m_origin;
|
||
|
diff --git a/libdiscover/backends/FwupdBackend/FwupdTransaction.cpp b/libdiscover/backends/FwupdBackend/FwupdTransaction.cpp
|
||
|
index f20b9ab58..44232f18d 100644
|
||
|
--- a/libdiscover/backends/FwupdBackend/FwupdTransaction.cpp
|
||
|
+++ b/libdiscover/backends/FwupdBackend/FwupdTransaction.cpp
|
||
|
@@ -83,10 +83,6 @@ void FwupdTransaction::fwupdInstall(const QString &file)
|
||
|
FwupdInstallFlags install_flags = FWUPD_INSTALL_FLAG_NONE;
|
||
|
g_autoptr(GError) error = nullptr;
|
||
|
|
||
|
- /* only offline supported */
|
||
|
- if (m_app->isOnlyOffline())
|
||
|
- install_flags = static_cast<FwupdInstallFlags>(install_flags | FWUPD_INSTALL_FLAG_OFFLINE);
|
||
|
-
|
||
|
if (!fwupd_client_install(m_backend->client, m_app->deviceId().toUtf8().constData(), file.toUtf8().constData(), install_flags, nullptr, &error)) {
|
||
|
m_backend->handleError(error);
|
||
|
setStatus(DoneWithErrorStatus);
|