Commit Graph

135 Commits

Author SHA1 Message Date
Richard Hughes
7419e9624a trivial: Use the correct index value when getting the local file descriptor
I assume GLib in F25 is more strict about invalid values.
2016-11-22 19:48:06 +00:00
Philip Withnall
bc339aa657 Fix redeclaration of polkit autocleanup functions
ifdef cannot be used to determine if a C symbol is defined, as it’s
evaluated by the preprocessor, before symbols are parsed. Instead, try
to detect whether polkit.h is suitably recent enough to define its own
auto-cleanup functions.

Signed-off-by: Richard Hughes <richard@hughsie.com>
2016-11-22 16:13:33 +00:00
Richard Hughes
fec2480330 trivial: Fix a critical warning on shutdown 2016-11-04 09:30:14 +00:00
Mario Limonciello
54a5a21757 Show a different error when checking for updates while on battery power (#68) 2016-10-19 14:29:53 -05:00
Mario Limonciello
3ef952fcea Verify devices support updating in mode they are called.
Providers that have both online and offline update methods don't
do verification that the device actually supports that mode.

This caused problems for Dell TPM devices where if you called
$ fwupdmgr install tpm.cab

It would attempt to use the online stub added in 1d97c8b5.
This would of course fall over requiring you to call with
$ fwupdmgr install tpm.cab --allow-offline

This fix will guarantee that the current install fallback
logic takes into account both device and provider support
for online/offline.
2016-09-20 12:34:42 -05:00
Richard Hughes
27aad5ac1f Add a fallback for older appstream-glib releases
Fixes: https://github.com/hughsie/fwupd/issues/62
2016-08-29 16:12:26 +01:00
Richard Hughes
4ced466f95 trivial: Fix two more compile warnings 2016-08-26 17:33:10 +01:00
Richard Hughes
2db526d178 Save the unique ID in the pending database
Also, generate something sensible if we're reading the status of an old task.
2016-08-25 15:07:25 +01:00
Richard Hughes
fdf46169f3 Ignore devices that do not add at least one GUID 2016-08-25 13:05:18 +01:00
Richard Hughes
644562e291 Use the correct define prefix for FwupdDeviceFlags
Also, add the compat flags so we don't break API.
2016-08-22 10:30:24 +01:00
Richard Hughes
5c066adf29 Use the SHA1 hash of the local file data as the component origin
This means we have a different cache-id for locally modified .cab files.
This allows us to update the text in the metadata without reloading the client.
2016-08-18 18:38:33 +01:00
Richard Hughes
fa782a3915 Add fwupd_result_get_unique_id()
This allows us to have a unique string that identifies the component and can be
used as a cache key.
2016-08-18 18:36:11 +01:00
Richard Hughes
060af614a5 trivial: Ensure the daemon always returns to IDLE 2016-08-17 17:46:15 +01:00
Richard Hughes
14d176499d Handle the 8Bitdo bootloader in a better way 2016-08-17 17:46:15 +01:00
Richard Hughes
876c007b1a Allow providers to export percentage completion 2016-08-17 17:46:15 +01:00
Richard Hughes
ae87438781 trivial: Don't show the current release in the fwupdmgr get-updates output 2016-08-17 17:46:15 +01:00
Richard Hughes
01b9a838b4 Show the vendor flashing instructions when installing 2016-08-16 17:59:32 +01:00
Richard Hughes
4fd38c8f1b trivial: Only show the device error when no devices are due to be updated
Showing a 'no attached hardware matched' then a large list of GUIDs isn't
super helpful.
2016-08-16 17:57:49 +01:00
Richard Hughes
0bda054f63 trivial: Show a warning when a requested plugin is not loaded 2016-08-11 15:35:30 +01:00
Richard Hughes
33a518a615 Add another compile warning and fix up any build failures 2016-07-27 16:57:36 +01:00
Richard Hughes
f192bf025a trivial: Switch to compiling with C99 by default
We're already using non-MSVC features like g_autoptr().
2016-07-22 08:41:59 +01:00
Richard Hughes
9a52c5ed2c Allow blacklisting devices by their GUID
Fixes: https://github.com/hughsie/fwupd/issues/10#issuecomment-233207616
2016-07-18 09:17:02 +01:00
Mario Limonciello
958ead697b Add Dell TPM and TB15/WD15 support via new Dell provider.
This provider will provide support for items that can be flashed
as capsules but aren't present in the ESRT table.

The MST hub and TBT NVM are not yet updatable, but GUIDs are
created to represent them when they are.
2016-07-13 12:30:25 -05:00
Richard Hughes
c8646aff32 Show a more detailed error when installing firmware on the wildcard
Based on a patch by Mario Limonciello, many thanks.
2016-07-04 13:06:17 +01:00
Richard Hughes
bd40528575 Don't make failures critical while checking versions or locked state
Based on a patch by Mario Limonciello, many thanks.
2016-07-04 13:00:54 +01:00
Richard Hughes
3ab17e63dd trivial: Refactor the update helper
No logic changes.
2016-07-04 12:37:22 +01:00
Richard Hughes
346ea88135 trivial: Move a conditional out of the way 2016-07-04 12:31:06 +01:00
Richard Hughes
ce38d94d5e trivial: Get rid of useless internal-only gtk-doc markup 2016-06-29 11:25:25 +01:00
Richard Hughes
a4a2c18ac8 Use the correct firmware blob when installing a composite device update 2016-06-29 11:08:29 +01:00
Richard Hughes
fe5cc9021c Add support for installing against multiple devices from a CAB file
Based on a set of patches from Mario Limonciello <mario_limonciello@dell.com>,
many thanks.
2016-06-29 11:08:29 +01:00
Richard Hughes
db468eef67 trivial: Explicitly tag downgrades in the helper 2016-06-29 10:11:53 +01:00
Richard Hughes
4921bd9770 Ensure the update ID is set when getting local firmware details 2016-06-27 11:17:43 +01:00
Mario Limonciello
8eaadd09d8 In get-details output, display the blob filename
This makes it easier to debug issues with CAB files with multiple
payloads
2016-06-22 15:01:09 -05:00
Mario Limonciello
c2cbd1ab6f trivial: s,cd_,fu_, in a few places in fu-main 2016-06-22 14:59:42 -05:00
Richard Hughes
7289a6b5f0 Add a GetDetailsLocal() method to eventually replace GetDetails()
This allows us to return multiple results from one file, for instance where the
firmware.cab file contains multiple metainfo.xml files.

This allows us to show all the entries in the firmware file, rather than
searching for the installed device that matches and falling back to just the
first listed item.
2016-05-29 09:57:24 +01:00
Richard Hughes
8ac07dcd1c trivial: Modularize the GetDetails call 2016-05-29 09:27:56 +01:00
Richard Hughes
c1a08c75d8 Support returning multiple GUIDs from GetDetails 2016-05-25 09:47:40 +01:00
Mario Limonciello
ff94ccde59 Enforce allowing providers to take away flash abilities
The flags for ALLOW_OFFLINE and ALLOW_ONLINE aren't currently used to
block a provider from flashing a file by hand.
2016-05-18 00:38:08 -05:00
Mario Limonciello
3321d7ea09 Test for a locked device when trying to install firmware update
Although other checks may also fail, the error shown when trying
to install a CAB that matches a GUID on the system that is locked
should be a message to unlock the device.
2016-05-18 00:37:59 -05:00
Richard Hughes
6561c8daf7 Only return updatable devices from GetDevices()
Fixes some of https://github.com/hughsie/fwupd/pull/47
2016-05-17 16:24:09 +01:00
Richard Hughes
99147f180b Allow devices to have multiple assigned GUIDs 2016-05-17 09:35:04 +01:00
Mario Limonciello
71a5b98d30 Add support for a --force flag to override provider warnings
Under some circumstances a provider may want to prevent a user from
performing a flash without additional user interaction.

Providers can opt into this behavior by checking for
FWUPD_INSTALL_FLAG_FORCE in the update routine.
2016-05-10 15:41:16 -05:00
Richard Hughes
21542abb0a Set the device description when parsing local firmware files
We were overwriting the update description, so we never noticed before.
2016-04-29 10:55:16 +01:00
Richard Hughes
dde7a2f6e6 Re-match devices when the AppStream metadata is updated
This allows us to notify clients watching for the 'supported' property for
new devices added to the LVFS.
2016-04-28 16:56:23 +01:00
Richard Hughes
422e866bc8 Match the AppStream metadata after a device has been adedd
This allows us to match specific properties by watching the ::DeviceChanged()
signal.
2016-04-28 16:56:23 +01:00
Richard Hughes
8ca33784ec Add device-added, device-removed and device-changed signals
This allows us to watch a specific device from client code without
re-requesting the device list on every Changed() signal.
2016-04-28 16:56:23 +01:00
Richard Hughes
4f4e1f3478 Add a 'supported' flag to the FuDevice
This is TRUE when the device has been found in the LVFS metadata.
2016-04-28 16:56:23 +01:00
Richard Hughes
37e9d777e5 Fix a critical warning when restarting the daemon
Emit the Status property with the correct type
2016-04-28 16:56:23 +01:00
Richard Hughes
654f6b82f3 Return all update descriptions newer than the installed version
Fixes: https://github.com/hughsie/fwupd/issues/45
2016-04-25 12:30:49 +01:00
Richard Hughes
9559bbe42d Connect to UPower at startup 2016-03-29 19:18:52 +01:00