From 99a5356bfb8927b8dd98179167bdf7b8c6dc3d97 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Thu, 28 Jun 2018 12:54:40 +0200 Subject: [PATCH] Make p2p support non-optional, now that we depend on 0.99.1 Closes: #175 Approved by: alexlarsson --- configure.ac | 22 ---------------------- src/builder-main.c | 4 ---- 2 files changed, 26 deletions(-) diff --git a/configure.ac b/configure.ac index bc86c81c..48e396cc 100644 --- a/configure.ac +++ b/configure.ac @@ -158,28 +158,6 @@ AS_IF([test "x$have_yaml" = "xno"],[ [AC_MSG_ERROR([yaml-0.1 was not found, which is needed for --with-yaml])]) ], [AC_DEFINE([FLATPAK_BUILDER_ENABLE_YAML],[1],[Define if yaml supported])]) -# Do we enable building peer to peer support using libostree’s experimental (non-stable) API? -# If so, OSTREE_ENABLE_EXPERIMENTAL_API needs to be #defined before ostree.h is -# included. -AC_ARG_ENABLE([p2p], - [AS_HELP_STRING([--enable-p2p], - [Enable unstable peer to peer support [default=no]])],, - [enable_p2p=no]) -AS_IF([test x$enable_p2p = xyes],[ - PKG_CHECK_MODULES(OSTREE, [ostree-1 >= $OSTREE_REQS]) - - ostree_features=$($PKG_CONFIG --variable=features ostree-1) - AS_CASE(["$ostree_features"], - [*experimental*],[have_ostree_experimental=yes]) - - AS_IF([test "x$have_ostree_experimental" != "xyes"], - [AC_MSG_ERROR([Experimental API not found in ostree-1, which is needed for --enable-p2p. OSTree must be compiled with --enable-experimental-api.])]) - - AC_DEFINE([OSTREE_ENABLE_EXPERIMENTAL_API],[1],[Define if libostree experimental API should be enabled]) - AC_DEFINE([FLATPAK_ENABLE_P2P],[1],[Define if peer to peer support should be enabled]) -]) -AM_CONDITIONAL([ENABLE_P2P],[test x$enable_p2p = xyes]) - AC_ARG_ENABLE(documentation, AC_HELP_STRING([--enable-documentation], [Build documentation]),, enable_documentation=yes) diff --git a/src/builder-main.c b/src/builder-main.c index edafe7b3..5f09ea6a 100644 --- a/src/builder-main.c +++ b/src/builder-main.c @@ -111,9 +111,7 @@ static GOptionEntry entries[] = { { "repo", 0, 0, G_OPTION_ARG_STRING, &opt_repo, "Repo to export into", "DIR"}, { "subject", 's', 0, G_OPTION_ARG_STRING, &opt_subject, "One line subject (passed to build-export)", "SUBJECT" }, { "body", 'b', 0, G_OPTION_ARG_STRING, &opt_body, "Full description (passed to build-export)", "BODY" }, -#ifdef FLATPAK_ENABLE_P2P { "collection-id", 0, 0, G_OPTION_ARG_STRING, &opt_collection_id, "Collection ID (passed to build-export)", "COLLECTION-ID" }, -#endif /* FLATPAK_ENABLE_P2P */ { "gpg-sign", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_key_ids, "GPG Key ID to sign the commit with", "KEY-ID"}, { "gpg-homedir", 0, 0, G_OPTION_ARG_STRING, &opt_gpg_homedir, "GPG Homedir to use when looking for keyrings", "HOMEDIR"}, { "force-clean", 0, 0, G_OPTION_ARG_NONE, &opt_force_clean, "Erase previous contents of DIRECTORY", NULL }, @@ -429,14 +427,12 @@ main (int argc, manifest_rel_path = argv[argnr++]; manifest_basename = g_path_get_basename (manifest_rel_path); -#ifdef FLATPAK_ENABLE_P2P if (opt_collection_id != NULL && !ostree_validate_collection_id (opt_collection_id, &error)) { g_printerr ("‘%s’ is not a valid collection ID: %s", opt_collection_id, error->message); return 1; } -#endif /* FLATPAK_ENABLE_P2P */ if (app_dir_path) app_dir = g_file_new_for_path (app_dir_path);