summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2016-07-27 11:11:13 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2016-07-30 11:24:52 +0000
commit88676932406ea3bc35abc4dc84ac7efecd493d6a (patch)
treed6f1c0cabf07bfe328d51755f913851798b44227
parent30963766c7b22779210464c47cc4d0c0c171debf (diff)
downloadostree-88676932406ea3bc35abc4dc84ac7efecd493d6a.tar.gz
libostree: mark ostree_repo_checkout_tree_at as deprecated
and move its definition to a separate file. Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com> Closes: #417 Approved by: cgwalters
-rw-r--r--Makefile-libostree-defines.am1
-rw-r--r--Makefile-libostree.am3
-rw-r--r--src/libostree/ostree-repo-checkout.c2
-rw-r--r--src/libostree/ostree-repo-deprecated.h69
-rw-r--r--src/libostree/ostree-repo.h41
5 files changed, 79 insertions, 37 deletions
diff --git a/Makefile-libostree-defines.am b/Makefile-libostree-defines.am
index 2d478bb6..e3ec3950 100644
--- a/Makefile-libostree-defines.am
+++ b/Makefile-libostree-defines.am
@@ -35,4 +35,5 @@ libostree_public_headers = \
src/libostree/ostree-sysroot-upgrader.h \
src/libostree/ostree-deployment.h \
src/libostree/ostree-bootconfig-parser.h \
+ src/libostree/ostree-repo-deprecated.h \
$(NULL)
diff --git a/Makefile-libostree.am b/Makefile-libostree.am
index efddd37d..0be60a18 100644
--- a/Makefile-libostree.am
+++ b/Makefile-libostree.am
@@ -205,7 +205,8 @@ gpgreadmedir = $(pkgdatadir)/trusted.gpg.d
EXTRA_DIST += src/libostree/README-gpg src/libostree/bupsplit.h \
src/libostree/ostree-enumtypes.h.template \
src/libostree/ostree-enumtypes.c.template \
- src/libostree/ostree-deployment-private.h
+ src/libostree/ostree-deployment-private.h \
+ src/libostree/ostree-repo-deprecated.h
install-mkdir-remotes-d-hook:
mkdir -p $(DESTDIR)$(sysconfdir)/ostree/remotes.d
diff --git a/src/libostree/ostree-repo-checkout.c b/src/libostree/ostree-repo-checkout.c
index 1010d239..4e0f0a23 100644
--- a/src/libostree/ostree-repo-checkout.c
+++ b/src/libostree/ostree-repo-checkout.c
@@ -844,6 +844,8 @@ ostree_repo_checkout_tree (OstreeRepo *self,
* Note in addition that unlike ostree_repo_checkout_tree(), the
* default is not to use the repository-internal uncompressed objects
* cache.
+ *
+ * This function is deprecated. Use ostree_repo_checkout_at() instead.
*/
gboolean
ostree_repo_checkout_tree_at (OstreeRepo *self,
diff --git a/src/libostree/ostree-repo-deprecated.h b/src/libostree/ostree-repo-deprecated.h
new file mode 100644
index 00000000..bb4b09d7
--- /dev/null
+++ b/src/libostree/ostree-repo-deprecated.h
@@ -0,0 +1,69 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ *
+ * Copyright (C) 2016 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#pragma once
+
+#include "ostree-core.h"
+#include "ostree-types.h"
+
+#ifndef G_GNUC_DEPRECATED_FOR
+# define G_GNUC_DEPRECATED_FOR(x)
+#endif
+
+G_BEGIN_DECLS
+
+/**
+ * OstreeRepoCheckoutOptions: (skip)
+ *
+ * An extensible options structure controlling checkout. Ensure that
+ * you have entirely zeroed the structure, then set just the desired
+ * options. This is used by ostree_repo_checkout_tree_at() which
+ * supercedes previous separate enumeration usage in
+ * ostree_repo_checkout_tree().
+ */
+typedef struct {
+ OstreeRepoCheckoutMode mode;
+ OstreeRepoCheckoutOverwriteMode overwrite_mode;
+
+ guint enable_uncompressed_cache : 1;
+ guint disable_fsync : 1;
+ guint process_whiteouts : 1;
+ guint no_copy_fallback : 1;
+ guint reserved : 28;
+
+ const char *subpath;
+
+ OstreeRepoDevInoCache *devino_to_csum_cache;
+
+ guint unused_uints[6];
+ gpointer unused_ptrs[7];
+} OstreeRepoCheckoutOptions;
+
+_OSTREE_PUBLIC
+gboolean ostree_repo_checkout_tree_at (OstreeRepo *self,
+ OstreeRepoCheckoutOptions *options,
+ int destination_dfd,
+ const char *destination_path,
+ const char *commit,
+ GCancellable *cancellable,
+ GError **error)
+G_GNUC_DEPRECATED_FOR(ostree_repo_checkout_at);
+
+G_END_DECLS
diff --git a/src/libostree/ostree-repo.h b/src/libostree/ostree-repo.h
index 28766a24..04f467d2 100644
--- a/src/libostree/ostree-repo.h
+++ b/src/libostree/ostree-repo.h
@@ -736,33 +736,6 @@ ostree_repo_checkout_tree (OstreeRepo *self,
GError **error);
/**
- * OstreeRepoCheckoutOptions: (skip)
- *
- * An extensible options structure controlling checkout. Ensure that
- * you have entirely zeroed the structure, then set just the desired
- * options. This is used by ostree_repo_checkout_tree_at() which
- * supercedes previous separate enumeration usage in
- * ostree_repo_checkout_tree().
- */
-typedef struct {
- OstreeRepoCheckoutMode mode;
- OstreeRepoCheckoutOverwriteMode overwrite_mode;
-
- guint enable_uncompressed_cache : 1;
- guint disable_fsync : 1;
- guint process_whiteouts : 1;
- guint no_copy_fallback : 1;
- guint reserved : 28;
-
- const char *subpath;
-
- OstreeRepoDevInoCache *devino_to_csum_cache;
-
- guint unused_uints[6];
- gpointer unused_ptrs[7];
-} OstreeRepoCheckoutOptions;
-
-/**
* OstreeRepoCheckoutAtOptions:
*
* An extensible options structure controlling checkout. Ensure that
@@ -798,15 +771,6 @@ _OSTREE_PUBLIC
void ostree_repo_devino_cache_unref (OstreeRepoDevInoCache *cache);
_OSTREE_PUBLIC
-gboolean ostree_repo_checkout_tree_at (OstreeRepo *self,
- OstreeRepoCheckoutOptions *options,
- int destination_dfd,
- const char *destination_path,
- const char *commit,
- GCancellable *cancellable,
- GError **error);
-
-_OSTREE_PUBLIC
gboolean ostree_repo_checkout_at (OstreeRepo *self,
OstreeRepoCheckoutAtOptions *options,
int destination_dfd,
@@ -1123,3 +1087,8 @@ gboolean ostree_repo_regenerate_summary (OstreeRepo *self,
G_END_DECLS
+
+
+/* Include here as the functions defined before should not depend on anything which
+ is defined in -deprecated.h. */
+#include "ostree-repo-deprecated.h"