From 8df776e36739e35f6c516c72766d112ea360afc5 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 13 Sep 2018 10:51:27 -0400 Subject: [PATCH] compose: Remove support for `ex-rojig-spec` in treefile In https://github.com/projectatomic/rpm-ostree/pull/1484 AKA commit https://github.com/projectatomic/rpm-ostree/commit/235e8f82da018d037472674c4da20a7acbc219fc 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 --- docs/manual/treefile.md | 4 ---- src/app/rpmostree-compose-builtin-tree.c | 17 ++++------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/docs/manual/treefile.md b/docs/manual/treefile.md index 0ed699cb..c0a885f5 100644 --- a/docs/manual/treefile.md +++ b/docs/manual/treefile.md @@ -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`. diff --git a/src/app/rpmostree-compose-builtin-tree.c b/src/app/rpmostree-compose-builtin-tree.c index 0f7aa14c..9fea43b2 100644 --- a/src/app/rpmostree-compose-builtin-tree.c +++ b/src/app/rpmostree-compose-builtin-tree.c @@ -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) - { - self->rojig_spec = g_strdup (ror_treefile_get_rojig_spec_path (self->treefile_rs)); - self->rojig_spec_in_workdir = TRUE; - } + if (self->treefile_rs) + self->rojig_spec = g_strdup (ror_treefile_get_rojig_spec_path (self->treefile_rs)); *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))