compose: With --cachedir, retain packages too

Really...we should have done this since day zero.  Given that the
final integration of package layering/compose/rpm caching is finally
over the horizion but not yet here, let's still do this now.

I plan to backport this patch to the 2016.3-fixes branch.

Closes: #332
Approved by: jlebon
This commit is contained in:
Colin Walters 2016-06-18 08:13:26 -04:00 committed by Atomic Bot
parent 8066844de0
commit b948ca1421

View File

@ -261,6 +261,10 @@ install_packages_in_root (RpmOstreeTreeComposeContext *self,
hif_context_set_repo_dir (hifctx, gs_file_get_path_cached (contextdir));
/* By default, retain packages in addition to metadata with --cachedir */
if (opt_cachedir)
hif_context_set_keep_cache (hifctx, TRUE);
g_key_file_set_string (treespec, "tree", "ref", self->ref);
g_key_file_set_string_list (treespec, "tree", "packages", (const char *const*)packages, g_strv_length (packages));