Add a KeepCache config parameter

This commit is contained in:
Richard Hughes 2014-09-16 09:38:47 +01:00
parent fbcd1b4527
commit 9a44b8d9ff
2 changed files with 7 additions and 0 deletions

View File

@ -242,6 +242,10 @@ pk_backend_initialize (GKeyFile *conf, PkBackend *backend)
hif_context_set_lock_dir (priv->context, lock_dir);
hif_context_set_rpm_verbosity (priv->context, "info");
/* do we keep downloaded packages */
ret = g_key_file_get_boolean (conf, "Daemon", "KeepCache", NULL);
hif_context_set_keep_cache (priv->context, ret);
/* if our cachedir is empty, copy over some default metadata */
cache_root = g_build_filename (destdir, "/var/cache/PackageKit", NULL);
cache_dir_fb = g_build_filename (destdir, "/usr/share/PackageKit/metadata", NULL);

View File

@ -16,3 +16,6 @@
# Shut down the daemon after this many seconds idle. 0 means don't shutdown.
#ShutdownTimeout=300
# Keep the packages after they have been downloaded
#KeepCache=false