diff options
author | Matthew Leeds <matthew.leeds@endlessm.com> | 2018-01-28 23:54:08 -0800 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-02-09 11:24:41 +0000 |
commit | 5ec98e788fa9b9faddb8326282d61492098796d0 (patch) | |
tree | dd88b773e82c7e6858a1f5033d7d20404f8175fc /app/flatpak-builtins-update.c | |
parent | ab53313713f4173735499fe9c5c877f6210d7dde (diff) | |
download | flatpak-5ec98e788fa9b9faddb8326282d61492098796d0.tar.gz |
search: Only update appstream data if it's old
Updating the appstream data on every invocation of the search command
involves a lot of overhead, so instead only update it if it's at least a
day out of date. This is consistent with how tools like dnf work.
Closes: #1352
Approved by: alexlarsson
Diffstat (limited to 'app/flatpak-builtins-update.c')
-rw-r--r-- | app/flatpak-builtins-update.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/flatpak-builtins-update.c b/app/flatpak-builtins-update.c index 01fac893..b38df288 100644 --- a/app/flatpak-builtins-update.c +++ b/app/flatpak-builtins-update.c @@ -92,7 +92,7 @@ flatpak_builtin_update (int argc, opt_arch = (char *)flatpak_get_arch (); if (opt_appstream) - return update_appstream (dirs, argc >= 2 ? argv[1] : NULL, opt_arch, cancellable, error); + return update_appstream (dirs, argc >= 2 ? argv[1] : NULL, opt_arch, 0, cancellable, error); prefs = &argv[1]; n_prefs = argc - 1; @@ -229,7 +229,7 @@ flatpak_builtin_update (int argc, } if (n_prefs == 0) - return update_appstream (dirs, NULL, opt_arch, cancellable, error); + return update_appstream (dirs, NULL, opt_arch, 0, cancellable, error); return TRUE; } |