sysupdate: Run ListFeatures in offline mode
Historically, the ListFeatures API (in both D-Bus and now varlink) was run without an `--offline` flag. This appears like it’s an oversight, but actually `verb_features()` always unconditionally loaded in offline mode. In any case, there doesn’t appear to be a reason for the context to be online (i.e. for it to check sources for available updates). Features are defined in local config files and are loaded by `read_features()`, which is called in both offline and online mode. When the varlink ListFeatures API was added, it was put into online mode in order to match the lack of `--offline` argument in the existing D-Bus API implementation. Change both of them to be explicitly in offline mode. Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
@@ -1380,7 +1380,7 @@ static int target_method_list_features(sd_bus_message *msg, void *userdata, sd_b
|
||||
if (flags != 0)
|
||||
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Flags must be 0");
|
||||
|
||||
r = sysupdate_run_simple(&json, t, "features", NULL);
|
||||
r = sysupdate_run_simple(&json, t, "--offline", "features", NULL);
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user