From 746c0593b3e0fd5bfab4d56d6959a87a9e6aa58f Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Wed, 19 May 2021 14:15:26 -0400 Subject: [PATCH] daemon/sysroot: Replace some rojig code with g_assert_not_reached() Prep for removing the APIs entirely. --- src/daemon/rpmostree-sysroot-core.cxx | 15 --------------- src/daemon/rpmostree-sysroot-upgrader.cxx | 10 ---------- src/daemon/rpmostreed-deployment-utils.cxx | 5 +---- src/daemon/rpmostreed-transaction-types.cxx | 3 +-- 4 files changed, 2 insertions(+), 31 deletions(-) diff --git a/src/daemon/rpmostree-sysroot-core.cxx b/src/daemon/rpmostree-sysroot-core.cxx index 94bcfe1f..1f8adc09 100644 --- a/src/daemon/rpmostree-sysroot-core.cxx +++ b/src/daemon/rpmostree-sysroot-core.cxx @@ -156,7 +156,6 @@ generate_pkgcache_refs (OstreeSysroot *sysroot, for (guint i = 0; i < deployments->len; i++) { auto deployment = static_cast(deployments->pdata[i]); - const char *current_checksum = ostree_deployment_get_csum (deployment); g_autofree char *base_commit = NULL; if (!rpmostree_deployment_get_base_layer (repo, deployment, &base_commit, error)) @@ -188,20 +187,6 @@ generate_pkgcache_refs (OstreeSysroot *sysroot, if (!add_package_refs_to_set (rsack, FALSE, referenced_pkgs, cancellable, error)) return glnx_prefix_error (error, "Deployment index=%d", i); } - /* In rojig mode, we need to also reference packages from the base; this - * is a different refspec format. - */ - if (rpmostree_origin_is_rojig (origin)) - { - const char *actual_base_commit = base_commit ?: current_checksum; - g_autoptr(RpmOstreeRefSack) base_rsack = - rpmostree_get_base_refsack_for_commit (repo, actual_base_commit, cancellable, error); - if (base_rsack == NULL) - return FALSE; - - if (!add_package_refs_to_set (base_rsack, TRUE, referenced_pkgs, cancellable, error)) - return FALSE; - } /* also add any inactive local replacements */ GHashTable *local_replace = rpmostree_origin_get_overrides_local_replace (origin); diff --git a/src/daemon/rpmostree-sysroot-upgrader.cxx b/src/daemon/rpmostree-sysroot-upgrader.cxx index 7f7c16b0..5a48effb 100644 --- a/src/daemon/rpmostree-sysroot-upgrader.cxx +++ b/src/daemon/rpmostree-sysroot-upgrader.cxx @@ -947,16 +947,6 @@ prep_local_assembly (RpmOstreeSysrootUpgrader *self, cancellable, error)) return FALSE; - if (rpmostree_origin_is_rojig (self->origin)) - { - /* We don't want to re-check the metadata, we already did that for the - * base. In the future we should try to re-use the DnfContext. - */ - g_autoptr(DnfState) hifstate = dnf_state_new (); - if (!dnf_context_setup_sack (rpmostree_context_get_dnf (self->ctx), hifstate, error)) - return FALSE; - } - const gboolean have_packages = (self->overlay_packages->len > 0 || g_hash_table_size (local_pkgs) > 0 || self->override_remove_packages->len > 0 || diff --git a/src/daemon/rpmostreed-deployment-utils.cxx b/src/daemon/rpmostreed-deployment-utils.cxx index 1d4fa5da..3773cfc6 100644 --- a/src/daemon/rpmostreed-deployment-utils.cxx +++ b/src/daemon/rpmostreed-deployment-utils.cxx @@ -338,10 +338,7 @@ rpmostreed_deployment_generate_variant (OstreeSysroot *sysroot, } break; case RPMOSTREE_REFSPEC_TYPE_ROJIG: - { - g_variant_dict_insert (dict, "rojig-description", "@a{sv}", - rpmostree_origin_get_rojig_description (origin)); - } + g_assert_not_reached (); break; } diff --git a/src/daemon/rpmostreed-transaction-types.cxx b/src/daemon/rpmostreed-transaction-types.cxx index bc194e6a..782ee38d 100644 --- a/src/daemon/rpmostreed-transaction-types.cxx +++ b/src/daemon/rpmostreed-transaction-types.cxx @@ -212,8 +212,7 @@ apply_revision_override (RpmostreedTransaction *transaction, } break; case RPMOSTREE_REFSPEC_TYPE_ROJIG: - /* This case we'll look up later */ - rpmostree_origin_set_rojig_version (origin, version); + g_assert_not_reached (); break; case RPMOSTREE_REFSPEC_TYPE_CHECKSUM: g_assert_not_reached (); /* Handled above */