daemon/sysroot: Replace some rojig code with g_assert_not_reached()
Prep for removing the APIs entirely.
This commit is contained in:
parent
82f024d45b
commit
746c0593b3
@ -156,7 +156,6 @@ generate_pkgcache_refs (OstreeSysroot *sysroot,
|
||||
for (guint i = 0; i < deployments->len; i++)
|
||||
{
|
||||
auto deployment = static_cast<OstreeDeployment *>(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);
|
||||
|
@ -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 ||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user