diff --git a/src/daemon/rpmostreed-deployment-utils.c b/src/daemon/rpmostreed-deployment-utils.c index 53c179f737..f05ea3d429 100644 --- a/src/daemon/rpmostreed-deployment-utils.c +++ b/src/daemon/rpmostreed-deployment-utils.c @@ -157,7 +157,8 @@ variant_add_commit_details (GVariantDict *dict, } GVariant * -rpmostreed_deployment_generate_variant (OstreeDeployment *deployment, +rpmostreed_deployment_generate_variant (OstreeSysroot *sysroot, + OstreeDeployment *deployment, const char *booted_id, OstreeRepo *repo, GError **error) diff --git a/src/daemon/rpmostreed-deployment-utils.h b/src/daemon/rpmostreed-deployment-utils.h index da004650f3..68f31238bf 100644 --- a/src/daemon/rpmostreed-deployment-utils.h +++ b/src/daemon/rpmostreed-deployment-utils.h @@ -30,15 +30,16 @@ OstreeDeployment * GVariant * rpmostreed_deployment_generate_blank_variant (void); -GVariant * rpmostreed_deployment_generate_variant (OstreeDeployment *deployment, - const char *booted_id, - OstreeRepo *repo, - GError **error); +GVariant * rpmostreed_deployment_generate_variant (OstreeSysroot *sysroot, + OstreeDeployment *deployment, + const char *booted_id, + OstreeRepo *repo, + GError **error); GVariant * rpmostreed_commit_generate_cached_details_variant (OstreeDeployment *deployment, - OstreeRepo *repo, - const gchar *refspec, - GError **error); + OstreeRepo *repo, + const gchar *refspec, + GError **error); gint rpmostreed_rollback_deployment_index (const gchar *name, OstreeSysroot *ot_sysroot, diff --git a/src/daemon/rpmostreed-os.c b/src/daemon/rpmostreed-os.c index 23cf7941cf..279919c94c 100644 --- a/src/daemon/rpmostreed-os.c +++ b/src/daemon/rpmostreed-os.c @@ -1198,7 +1198,8 @@ rpmostreed_os_load_internals (RpmostreedOS *self, GError **error) booted = ostree_sysroot_get_booted_deployment (ot_sysroot); if (booted && g_strcmp0 (ostree_deployment_get_osname (booted), name) == 0) { - booted_variant = rpmostreed_deployment_generate_variant (booted, booted_id, ot_repo, error); + booted_variant = rpmostreed_deployment_generate_variant (ot_sysroot, booted, booted_id, + ot_repo, error); if (!booted_variant) return FALSE; booted_id = rpmostreed_deployment_generate_id (booted); @@ -1209,11 +1210,12 @@ rpmostreed_os_load_internals (RpmostreedOS *self, GError **error) { if (g_strcmp0 (ostree_deployment_get_osname (deployments->pdata[i]), name) == 0) { - default_variant = rpmostreed_deployment_generate_variant (deployments->pdata[i], + default_variant = rpmostreed_deployment_generate_variant (ot_sysroot, + deployments->pdata[i], booted_id, ot_repo, error); - if (default_variant == NULL) - return FALSE; + if (default_variant == NULL) + return FALSE; break; } } @@ -1223,8 +1225,9 @@ rpmostreed_os_load_internals (RpmostreedOS *self, GError **error) rollback_index = rpmostreed_rollback_deployment_index (name, ot_sysroot, NULL); if (rollback_index >= 0) { - rollback_variant = rpmostreed_deployment_generate_variant (deployments->pdata[rollback_index], booted_id, - ot_repo, error); + rollback_variant = rpmostreed_deployment_generate_variant (ot_sysroot, + deployments->pdata[rollback_index], booted_id, + ot_repo, error); if (!rollback_variant) return FALSE; } diff --git a/src/daemon/rpmostreed-sysroot.c b/src/daemon/rpmostreed-sysroot.c index 3435f7991c..d205171633 100644 --- a/src/daemon/rpmostreed-sysroot.c +++ b/src/daemon/rpmostreed-sysroot.c @@ -494,10 +494,11 @@ sysroot_populate_deployments_unlocked (RpmostreedSysroot *self, GVariant *variant; OstreeDeployment *deployment = deployments->pdata[i]; const char *deployment_os; - - variant = rpmostreed_deployment_generate_variant (deployment, booted_id, self->repo, error); + + variant = rpmostreed_deployment_generate_variant (self->ot_sysroot, deployment, + booted_id, self->repo, error); if (!variant) - goto out; + goto out; g_variant_builder_add_value (&builder, variant); deployment_os = ostree_deployment_get_osname (deployment);