[gnome-ostree/wip/split-debuginfo] Initial stub work for split debuginfo
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-ostree/wip/split-debuginfo] Initial stub work for split debuginfo
- Date: Wed, 13 Feb 2013 23:58:06 +0000 (UTC)
commit 5bc4eb5a1874374d63c5a2822facedc4046dde69
Author: Colin Walters <walters verbum org>
Date: Wed Feb 13 18:57:47 2013 -0500
Initial stub work for split debuginfo
configure.ac | 20 ++++--
.../gnome-ostree-strip-installtree.c | 73 ++++++++++++++++++++
2 files changed, 86 insertions(+), 7 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a29ac58..3687694 100644
--- a/configure.ac
+++ b/configure.ac
@@ -39,13 +39,19 @@ LT_INIT([disable-static])
GOBJECT_INTROSPECTION_REQUIRE([1.34.0])
-AC_ARG_ENABLE(buildsystem,
- AS_HELP_STRING([--disable-buildsystem], [Don't install buildsystem]),,
- enable_buildsystem=yes)
-AM_CONDITIONAL(BUILDSYSTEM, test x$enable_buildsystem != xno)
-
-PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0 >= 2.34.0])
-GIO_UNIX_CFLAGS="$GIO_UNIX_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_34
-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_34"
+AC_ARG_ENABLE(strip-installtree,
+ AS_HELP_STRING([--enable-gnome-strip-installtree], [Only install gnome-ostree-strip-installtree
tool]),,
+ enable_strip_installtree=no)
+AM_CONDITIONAL(BUILD_STRIP_INSTALLTREE, test x$enable_strip_installtree != xno)
+AS_IF([ test x$enable_strip_installtree = xno ], [
+ [ build_ostbuild=yes ],
+ [ build_ostbuild=no ])
+AM_CONDITIONAL(BUILD_OSTBUILD, test x$build_ostbuild = xyes)
+
+AS_IF([ test x$build_ostbuild = xyes ], [
+ PKG_CHECK_MODULES(GIO_UNIX, [gio-unix-2.0 >= 2.34.0])
+ GIO_UNIX_CFLAGS="$GIO_UNIX_CFLAGS -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_34
-DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_34"
+])
AC_CONFIG_FILES([
Makefile
diff --git a/src/strip-installtree/gnome-ostree-strip-installtree.c
b/src/strip-installtree/gnome-ostree-strip-installtree.c
new file mode 100644
index 0000000..23842e4
--- /dev/null
+++ b/src/strip-installtree/gnome-ostree-strip-installtree.c
@@ -0,0 +1,73 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
+ *
+ * Copyright (C) 2013 Colin Walters <walters verbum org>
+ *
+ * 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.
+ */
+
+#include <gio.h>
+
+static char **opt_files;
+
+static GOptionEntry options[] = {
+ { "file", 0, 0, G_OPTION_ARG_STRING_ARRAY, &opt_files, "Path to system boot directory (default: /boot)",
NULL },
+ { NULL }
+};
+
+int
+main (int argc,
+ char **argv)
+{
+ gboolean ret = FALSE;
+ GOptionContext *context;
+ const char *dir = NULL;
+ GError *local_error = NULL;
+ GError **error = &local_error;
+
+ setenv ("GIO_USE_VFS", "local");
+
+ g_type_init ();
+
+ context = g_option_context_new ("[OPTIONS] [DIRECTORY] - Strip specified file or a directory");
+
+ if (!g_option_context_parse (context, &argc, &argv, error))
+ goto out;
+
+ if (argc > 1)
+ dir = argv[1];
+
+ if (dir && opt_files)
+ {
+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
+ "Can not specify directory and files together");
+ goto out;
+ }
+
+ if (dir)
+ {
+ GFile *dirpath = g_file_new_for_path (
+ if (!strip_directory_recurse
+ }
+
+ ret = TRUE;
+ out:
+ if (local_error)
+ {
+ g_printerr ("%s\n", local_error->message);
+ g_clear_error (&local_error);
+ }
+ return ret;
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]