Closed SteveLauC closed 3 days ago
cc @Tokariew, would you like to give this a test?
It look good, for root/user when there is update, in case there isn't one the lensfun-update-data
return 1
as exit status and topgrade return that lensfun failed
✗ ./topgrade --only lensfun
── 12:39:31 - Lensfun's database update ────────────────────────────────────────
Info: root privileges needed for updating the system database.
Info: updating user DB in '/home/tokariew/.local/share/lensfun/updates'
Reading http://lensfun.sourceforge.net/db/versions.json …
Reading http://wilson.bronger.org/lensfun-db/versions.json …
Info: No newer database was found for last installed Lensfun.
Lensfun's database update failed:
0: Command failed: `/usr/bin/lensfun-update-data`
1: `/usr/bin/lensfun-update-data` failed: exit status: 1
Location:
src/steps/generic.rs:994
Retry? (y)es/(N)o/(s)hell/(q)uit
── 12:39:33 - Summary ──────────────────────────────────────────────────────────
Lensfun's database update: FAILED
So not sure, how topgrade should behave in case there is no update.
Thanks for testing it!
Try the latest commit, it now takes 1 as a normal exit code:)
seems good for me, in all 4 basic cases root/normal user update/no update
tested with no internet and when added to pihole blacklist, and it fail in this case, so it look fine without lensfun installed it's not called. Not sure what else i can test
Thanks for the test, let's merge this pr.
What does this PR do
This PR adds support for updating Lensfun's lenses database via its cli tool
lensfun-update-data
.Per the documentation, this update command can be invoked with or without
sudo
so that one can decide where to install the update. Ifsudo
is used, then the update will be installed system-wide, available to all users. Otherwise, update will be install under user's home directory and thus exclusive to the user.This option is controlled through the following configuration entry in Topgrade:
Standards checklist
CONTRIBUTING.md
For new steps
--dry-run
option works with this stepIt should work as this is a one command step.
--yes
option works with this step if it is supported by the underlying commandThe
lensfun-update-data
command does not accept options.If you developed a feature or a bug fix for someone else and you do not have the means to test it, please tag this person here.