From d8263d2c385cd651bf82815a3fa10b7b0d837958 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 21 Dec 2020 16:08:51 +0000 Subject: [PATCH] Port rpmostree-builtin-compose to C++ Prep for using https://cxx.rs/ --- Makefile-rpm-ostree.am | 2 +- ...builtin-compose.c => rpmostree-builtin-compose.cxx} | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) rename src/app/{rpmostree-builtin-compose.c => rpmostree-builtin-compose.cxx} (80%) diff --git a/Makefile-rpm-ostree.am b/Makefile-rpm-ostree.am index ddc04b0c..7a27a531 100644 --- a/Makefile-rpm-ostree.am +++ b/Makefile-rpm-ostree.am @@ -59,7 +59,7 @@ rpm_ostree_SOURCES = src/app/main.cxx \ src/app/rpmostree-compose-builtin-tree.cxx \ src/app/rpmostree-composeutil.cxx \ src/app/rpmostree-composeutil.h \ - src/app/rpmostree-builtin-compose.c \ + src/app/rpmostree-builtin-compose.cxx \ $(librpmostreed_sources) \ $(librpmostreepriv_sources) \ $(NULL) diff --git a/src/app/rpmostree-builtin-compose.c b/src/app/rpmostree-builtin-compose.cxx similarity index 80% rename from src/app/rpmostree-builtin-compose.c rename to src/app/rpmostree-builtin-compose.cxx index cd1cfe9e..0d0bc917 100644 --- a/src/app/rpmostree-builtin-compose.c +++ b/src/app/rpmostree-builtin-compose.cxx @@ -32,21 +32,21 @@ static RpmOstreeCommand compose_subcommands[] = { { "tree", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD, "Process a \"treefile\"; install packages and commit the result to an OSTree repository", rpmostree_compose_builtin_tree }, - { "install", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_REQUIRES_ROOT, + { "install", (RpmOstreeBuiltinFlags)(RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_REQUIRES_ROOT), "Install packages into a target path", rpmostree_compose_builtin_install }, - { "postprocess", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_REQUIRES_ROOT, + { "postprocess", (RpmOstreeBuiltinFlags)(RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_REQUIRES_ROOT), "Perform final postprocessing on an installation root", rpmostree_compose_builtin_postprocess }, - { "commit", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_REQUIRES_ROOT, + { "commit", (RpmOstreeBuiltinFlags)(RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_REQUIRES_ROOT), "Commit a target path to an OSTree repository", rpmostree_compose_builtin_commit }, #ifdef BUILDOPT_ROJIG - { "rojig", RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_HIDDEN, + { "rojig", (RpmOstreeBuiltinFlags)(RPM_OSTREE_BUILTIN_FLAG_LOCAL_CMD | RPM_OSTREE_BUILTIN_FLAG_HIDDEN), "EXPERIMENTAL: Build a rojig RPM from a treefile, output to a local rpm-md repo", rpmostree_compose_builtin_rojig }, #endif - { NULL, 0, NULL, NULL } + { NULL, (RpmOstreeBuiltinFlags)0, NULL, NULL } }; gboolean