On devices with a lot of PCI devices this can take a couple of seconds per
device, and if this feature is not desired then disabling it saves system
resources.
The firmware may be more generic, and it also allows us to match the GUID then
doing 'verify' on a device with a different device PID than the firmware
actually declares.
This allows the text clients like fwupdmgr to convert to UTF-8 text, and
graphical clients can use the markdown target to ensure the links are made
clickable and paragraphs are presented in the right way.
For large files, EVENT_CREATED gets emitted when the first chunk hits the disk,
not when the file has finished copying. To fix, just wait for the file monitor
to hint that all the changes in the operation have happened and then process
the firmware files.
This downloads the latest version of the firmware and applies it to any
matching hardware. e.g.
$ fwupdmgr update
Downloading 1.2.3 for ColorHug...
Updating 1.2.3 on ColorHug...
* Loading firmware
* Decompressing firmware
* Restarting device
* Writing firmware to device
* Verifying firmware from device
* Restarting device
Done!
The way this works is we try with the user settings, and if this fails with
NotSupported and the offline flag is unset then we retry the action with a
warning and the flag manually set.
I chose to do this in the client rather than the daemon as I don't want to
encode too many magic rules when we don't know the kind of devices that will
appear in the future.
Fixes the other half of https://github.com/hughsie/fwupd/pull/23
It seems a little odd to call it 'Update' when it's being used for downgrading
and reinstalling as well.
As we're making things simpler, just use a single 'install' action in fwupdmgr
rather than 'install', 'update-online', 'update-offline'. We can use the flags
and fallbacks to do the right thing in all cases, and make the typical case
(installing a local file to any matching hardware) simple.
Fixes half of https://github.com/hughsie/fwupd/pull/23
This only returns the latest version, if you actually need to know details
about all versions including downgrades then you still need to load the
AppStream metadata and match devices manually.