daemon: only add base-checksum if pkgs layered
The origin might have an empty "requested" key in the "packages" section, which is probably an indication that packages were once added but were then removed. Explicitly check the length of the pkg array in case it's actually empty before adding the base-checksum to the deployment variant. Closes: #371 Approved by: cgwalters
This commit is contained in:
parent
5fb4a04e85
commit
8c76381a97
@ -223,7 +223,7 @@ rpmostreed_deployment_generate_variant (OstreeDeployment *deployment,
|
|||||||
g_variant_dict_insert (&dict, "osname", "s", osname);
|
g_variant_dict_insert (&dict, "osname", "s", osname);
|
||||||
g_variant_dict_insert (&dict, "serial", "i", serial);
|
g_variant_dict_insert (&dict, "serial", "i", serial);
|
||||||
g_variant_dict_insert (&dict, "checksum", "s", csum);
|
g_variant_dict_insert (&dict, "checksum", "s", csum);
|
||||||
if (origin_packages)
|
if (origin_packages != NULL && g_strv_length (origin_packages) > 0)
|
||||||
{
|
{
|
||||||
const char *parent = ostree_commit_get_parent (commit);
|
const char *parent = ostree_commit_get_parent (commit);
|
||||||
g_assert (parent);
|
g_assert (parent);
|
||||||
|
Loading…
Reference in New Issue
Block a user