summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsid <sidtosh4@gmail.com>2023-10-06 22:59:54 +0000
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>2023-10-10 18:46:44 -0400
commit8d07996154bfa3781345bafd01680e373410d6b0 (patch)
tree03f4dae6835fa79353ee2cac5b19207afc7560c8
parent825afa2a7cd9e99afa8352bd87e276997f888ee4 (diff)
trivial: Specify metadata 'cache-age' usage more clearly
Refer: #679
-rw-r--r--client/pk-console.c2
-rw-r--r--lib/packagekit-glib2/pk-client.c6
-rw-r--r--src/pk-backend-job.c2
3 files changed, 7 insertions, 3 deletions
diff --git a/client/pk-console.c b/client/pk-console.c
index 30e951054..056e37e65 100644
--- a/client/pk-console.c
+++ b/client/pk-console.c
@@ -1671,7 +1671,7 @@ main (int argc, char *argv[])
_("Print to screen a machine readable output, rather than using animated widgets"), NULL},
{ "cache-age", 'c', 0, G_OPTION_ARG_INT, &cache_age,
/* TRANSLATORS: command line argument, just output without fancy formatting */
- _("The maximum metadata cache age. Use -1 for 'never'."), NULL},
+ _("The maximum metadata cache age (in seconds). Use -1 to use only cache, 1 to reload cache."), NULL},
{ "allow-untrusted", '\0', 0, G_OPTION_ARG_NONE, &allow_untrusted,
/* command line argument, do we ask questions */
_("Allow untrusted packages to be installed."), NULL },
diff --git a/lib/packagekit-glib2/pk-client.c b/lib/packagekit-glib2/pk-client.c
index 1796eea60..9b5ee1c99 100644
--- a/lib/packagekit-glib2/pk-client.c
+++ b/lib/packagekit-glib2/pk-client.c
@@ -4605,7 +4605,8 @@ pk_client_get_idle (PkClient *client)
/**
* pk_client_set_cache_age:
* @client: a valid #PkClient instance
- * @cache_age: the cache age to set, where %G_MAXUINT means "never"
+ * @cache_age: the cache age to set in seconds, where %G_MAXUINT
+ * means cache "never expires"
*
* Sets the maximum cache age value for the client.
*
@@ -4737,6 +4738,9 @@ pk_client_class_init (PkClientClass *klass)
/**
* PkClient:cache-age:
*
+ * The cache age in seconds, where %G_MAXUINT means cache
+ * "never expires"
+ *
* Since: 0.6.10
*/
pspec = g_param_spec_uint ("cache-age", NULL, NULL,
diff --git a/src/pk-backend-job.c b/src/pk-backend-job.c
index a000bfebb..b6d0fd0ab 100644
--- a/src/pk-backend-job.c
+++ b/src/pk-backend-job.c
@@ -444,7 +444,7 @@ pk_backend_job_set_cache_age (PkBackendJob *job, guint cache_age)
if (cache_age != G_MAXUINT && cache_age > cache_age_offset)
cache_age -= cache_age_offset;
- g_debug ("cache-age changed to %u", cache_age);
+ g_debug ("cache-age changed to %u seconds", cache_age);
job->priv->cache_age = cache_age;
}