compose: Remove support for ex-rojig-spec in treefile

In https://github.com/projectatomic/rpm-ostree/pull/1484
AKA commit 235e8f82da
we introduced a new `rojig` treefile entry that is nicer and
more maintainable than a split spec file.

In prep for more "pure rojig" work, drop support for this key.
Note we can also only now do this because we hard require Rust, and
the new model is only implemented in Rust.

The only known user of this today is FAHC, but that is now
[pinned to an assembler build](https://pagure.io/fedora-atomic-host-continuous/c/cdcb6ae943bee643983d4bd22d00030f2eb930d2?branch=master).

Closes: #1558
Approved by: jlebon
This commit is contained in:
Colin Walters 2018-09-13 10:51:27 -04:00 committed by Atomic Bot
parent b82db2b501
commit 8df776e367
2 changed files with 4 additions and 17 deletions

View File

@ -229,7 +229,3 @@ version of `rpm-ostree`.
* `rojig`: Object, optional. Sub-keys are `name`, `summary`, `license`,
and `description`. Of those, `name` and `license` are mandatory.
* `ex-rojig-spec`: string, optional: If specified, will also cause
a run of `rpm-ostree ex commit2rojig` on changes. Also requires the
`--ex-rojig-output-rpm` commandline option.
Deprecated in favor of `rojig`.

View File

@ -125,7 +125,6 @@ typedef struct {
OstreeRepoDevInoCache *devino_cache;
char *ref;
char *rojig_spec;
gboolean rojig_spec_in_workdir;
char *previous_checksum;
RORTreefile *treefile_rs;
@ -1019,16 +1018,8 @@ rpm_ostree_compose_context_new (const char *treefile_pathstr,
return FALSE;
g_autoptr(GFile) treefile_dir = g_file_get_parent (self->treefile_path);
const char *rojig_spec = NULL;
if (!_rpmostree_jsonutil_object_get_optional_string_member (self->treefile, "ex-rojig-spec", &rojig_spec, error))
return FALSE;
if (rojig_spec)
self->rojig_spec = g_build_filename (gs_file_get_path_cached (treefile_dir), rojig_spec, NULL);
else if (self->treefile_rs)
{
if (self->treefile_rs)
self->rojig_spec = g_strdup (ror_treefile_get_rojig_spec_path (self->treefile_rs));
self->rojig_spec_in_workdir = TRUE;
}
*out_context = g_steal_pointer (&self);
return TRUE;
@ -1401,10 +1392,10 @@ impl_commit_tree (RpmOstreeTreeComposeContext *self,
if (rojig_outputdir)
{
if (!self->rojig_spec)
return glnx_throw (error, "No ex-rojig-spec provided");
return glnx_throw (error, "No rojig defined in treefile");
if (!rpmostree_commit2rojig (self->repo, self->pkgcache_repo,
new_revision,
self->rojig_spec_in_workdir ? self->workdir_dfd : AT_FDCWD,
self->workdir_dfd,
self->rojig_spec,
rojig_outputdir,
cancellable, error))