[gnome-software] trivial: Add a --cache-age parameter to gnome-software-cmd



commit b86c48805e5e74ba4d773b42a3c5ff36d04141af
Author: Richard Hughes <richard hughsie com>
Date:   Mon Sep 28 13:42:43 2015 +0100

    trivial: Add a --cache-age parameter to gnome-software-cmd
    
    This lets us debug the refresh action in the future.

 src/gs-cmd.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-cmd.c b/src/gs-cmd.c
index 492e1bf..8418086 100644
--- a/src/gs-cmd.c
+++ b/src/gs-cmd.c
@@ -178,6 +178,7 @@ main (int argc, char **argv)
        gboolean show_results = FALSE;
        guint64 refine_flags = GS_PLUGIN_REFINE_FLAGS_DEFAULT;
        gint i;
+       gint cache_age = 0;
        gint repeat = 1;
        int status = 0;
        g_autoptr(GError) error = NULL;
@@ -193,6 +194,8 @@ main (int argc, char **argv)
                  "Set any refine flags required for the action", NULL },
                { "repeat", '\0', 0, G_OPTION_ARG_INT, &repeat,
                  "Repeat the action this number of times", NULL },
+               { "cache-age", '\0', 0, G_OPTION_ARG_INT, &cache_age,
+                 "Use this maximum cache age in seconds", NULL },
                { "prefer-local", '\0', 0, G_OPTION_ARG_NONE, &prefer_local,
                  "Prefer local file sources to AppStream", NULL },
                { NULL}
@@ -375,7 +378,7 @@ main (int argc, char **argv)
                        }
                }
        } else if (argc == 2 && g_strcmp0 (argv[1], "refresh") == 0) {
-               ret = gs_plugin_loader_refresh (plugin_loader, 0,
+               ret = gs_plugin_loader_refresh (plugin_loader, cache_age,
                                                GS_PLUGIN_REFRESH_FLAGS_UPDATES,
                                                NULL, &error);
        } else {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]