[ostree] Remove built in "triggers"
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] Remove built in "triggers"
- Date: Sun, 7 Jul 2013 21:57:02 +0000 (UTC)
commit 26cef497a6bda37f8fdbe98238985f5b99e0a80a
Author: Colin Walters <walters verbum org>
Date: Sun Jul 7 14:37:59 2013 -0400
Remove built in "triggers"
Originally, the idea was that clients would replicate "OS/tree"s from
a build server, but we'd run things like "ldconfig" on the client.
This was to allow adding e.g. the nVidia binary driver.
However, the triggers were the only thing in the system at the moment
that really had expected knowledge of the *contents* of the OS, like
the location of binaries.
For now, it's architecturally cleaner if we move the burden of
triggers to the tree builder (e.g. gnome-ostree or RPM). Eventually
we may want OSTree to assist with this type of thing (perhaps
something like RPM %ghost), but this is the right thing to do now.
Makefile-daemon.am | 2 -
Makefile-libostree.am | 4 -
Makefile-ostree.am | 3 -
Makefile-otutil.am | 2 -
Makefile-switchroot.am | 2 -
Makefile-triggers.am | 41 ----
Makefile.am | 3 -
configure.ac | 19 +--
src/libostree/ostree-sysroot.c | 105 ---------
src/libostree/ostree-sysroot.h | 39 ----
src/libostree/ostree.h | 1 -
src/ostree/ot-admin-builtin-run-triggers.c | 61 -----
src/ostree/ot-admin-builtins.h | 1 -
src/ostree/ot-builtin-admin.c | 1 -
src/ostree/ot-builtin-checkout.c | 15 --
src/triggers/ostree-run-triggers.c | 233 --------------------
src/triggers/triggers.d/0001ldconfig.trigger | 23 --
src/triggers/triggers.d/0005depmod.trigger | 27 ---
src/triggers/triggers.d/0010mime-database.trigger | 23 --
src/triggers/triggers.d/0020dconf.trigger | 23 --
src/triggers/triggers.d/0030glib.trigger | 23 --
src/triggers/triggers.d/0040gdk-pixbuf.trigger | 24 --
src/triggers/triggers.d/0050gconf.trigger | 29 ---
src/triggers/triggers.d/0060immodules.trigger | 23 --
src/triggers/triggers.d/0070pango.trigger | 29 ---
src/triggers/triggers.d/0080gtk+.trigger | 30 ---
.../triggers.d/0090desktop-database.trigger | 23 --
.../triggers.d/0100fontconfig-cache.trigger | 23 --
28 files changed, 2 insertions(+), 830 deletions(-)
---
diff --git a/Makefile-daemon.am b/Makefile-daemon.am
index 3a9d718..aab7e40 100644
--- a/Makefile-daemon.am
+++ b/Makefile-daemon.am
@@ -17,9 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-if !TRIGGERS_ONLY
libexec_PROGRAMS += ostreed
-endif
ostreed_SOURCES = src/daemon/ostreed.c \
src/daemon/ot-daemon.h \
diff --git a/Makefile-libostree.am b/Makefile-libostree.am
index 21b9199..5641ae9 100644
--- a/Makefile-libostree.am
+++ b/Makefile-libostree.am
@@ -17,9 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-if !TRIGGERS_ONLY
privlib_LTLIBRARIES += libostree.la
-endif
libostree_la_SOURCES = src/libostree/ostree.h \
src/libostree/ostree-core.c \
@@ -41,8 +39,6 @@ libostree_la_SOURCES = src/libostree/ostree.h \
src/libostree/ostree-types.h \
src/libostree/ostree-traverse.c \
src/libostree/ostree-traverse.h \
- src/libostree/ostree-sysroot.c \
- src/libostree/ostree-sysroot.h \
$(NULL)
if USE_LIBARCHIVE
libostree_la_SOURCES += src/libostree/ostree-libarchive-input-stream.h \
diff --git a/Makefile-ostree.am b/Makefile-ostree.am
index 13f967e..ad06c81 100644
--- a/Makefile-ostree.am
+++ b/Makefile-ostree.am
@@ -17,9 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-if !TRIGGERS_ONLY
bin_PROGRAMS += ostree
-endif
ostree_SOURCES = src/ostree/main.c \
src/ostree/ostree-curl-fetcher.h \
@@ -59,7 +57,6 @@ ostree_SOURCES += \
src/ostree/ot-admin-builtin-os-init.c \
src/ostree/ot-admin-builtin-install.c \
src/ostree/ot-admin-builtin-status.c \
- src/ostree/ot-admin-builtin-run-triggers.c \
src/ostree/ot-admin-builtin-upgrade.c \
src/ostree/ot-admin-builtins.h \
src/ostree/ot-admin-cleanup.c \
diff --git a/Makefile-otutil.am b/Makefile-otutil.am
index 8598025..47ea98c 100644
--- a/Makefile-otutil.am
+++ b/Makefile-otutil.am
@@ -17,9 +17,7 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-if !TRIGGERS_ONLY
noinst_LTLIBRARIES += libotutil.la
-endif
libotutil_la_SOURCES = \
src/libotutil/ot-checksum-utils.c \
diff --git a/Makefile-switchroot.am b/Makefile-switchroot.am
index 9930106..3dacb87 100644
--- a/Makefile-switchroot.am
+++ b/Makefile-switchroot.am
@@ -15,13 +15,11 @@
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
-if !TRIGGERS_ONLY
if BUILDOPT_DRACUT
sbin_PROGRAMS += ostree-prepare-root
sbin_PROGRAMS += ostree-remount
noinst_LTLIBRARIES += libswitchroot-mountutil.la
endif
-endif
libswitchroot_mountutil_la_SOURCES = \
src/switchroot/ostree-mount-util.c \
diff --git a/Makefile.am b/Makefile.am
index 2f1a793..ac4bf5f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -76,16 +76,13 @@ endif
libgsystem_srcpath := src/libgsystem
libgsystem_cflags = $(OT_INTERNAL_GIO_UNIX_CFLAGS) -I$(srcdir)/src/libgsystem
libgsystem_libs = $(OT_INTERNAL_GIO_UNIX_LIBS)
-if !TRIGGERS_ONLY
include src/libgsystem/Makefile-libgsystem.am
noinst_LTLIBRARIES += libgsystem.la
-endif
include Makefile-daemon.am
include Makefile-otutil.am
include Makefile-libostree.am
include Makefile-ostree.am
include Makefile-switchroot.am
-include Makefile-triggers.am
include Makefile-tests.am
include Makefile-dracut.am
diff --git a/configure.ac b/configure.ac
index 5e82221..e10b9c0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,11 +31,6 @@ LT_INIT([disable-static])
OSTREE_FEATURES=""
AC_SUBST([OSTREE_FEATURES])
-AC_ARG_ENABLE(triggers-only,
- AS_HELP_STRING([--enable-triggers-only], [Only build and install triggers]),,
- enable_triggers_only=no)
-AM_CONDITIONAL(TRIGGERS_ONLY, test x$enable_triggers_only != xno)
-
AC_ARG_ENABLE(installed_tests,
AS_HELP_STRING([--enable-installed-tests],
[Install test programs (default: no)]),,
@@ -61,9 +56,6 @@ AS_IF([test x$enable_embedded_dependencies = xyes], [
AC_ARG_WITH(soup,
AS_HELP_STRING([--with-soup], [Use libsoup @<:@default=yes@:>@]),
[], [with_soup=check])
- if test x$enable_triggers_only != xno; then
- with_soup=no
- fi
AS_IF([test x$with_soup != xno ], [
AC_MSG_CHECKING([for $SOUP_DEPENDENCY])
PKG_CHECK_EXISTS($SOUP_DEPENDENCY, have_soup=yes, have_soup=no)
@@ -89,9 +81,6 @@ AC_ARG_ENABLE(documentation,
AC_HELP_STRING([--enable-documentation],
[build documentation]),,
enable_documentation=yes)
-if test x$enable_triggers_only != xno; then
- enable_documentation=no
-fi
if test x$enable_documentation = xyes; then
AC_PATH_PROG([XSLTPROC], [xsltproc])
if test x$XSLTPROC = x; then
@@ -103,9 +92,6 @@ AM_CONDITIONAL(BUILD_DOCUMENTATION, test x$enable_documentation = xyes)
AC_ARG_WITH(libarchive,
AS_HELP_STRING([--without-libarchive], [Do not use libarchive]),
:, with_libarchive=maybe)
-if test x$enable_triggers_only != xno; then
- with_libarchive=no
-fi
AS_IF([ test x$with_libarchive != xno ], [
AC_MSG_CHECKING([for $LIBARCHIVE_DEPENDENCY])
@@ -125,7 +111,7 @@ AS_IF([ test x$with_libarchive != xno ], [
if test x$with_libarchive != xno; then OSTREE_FEATURES="$OSTREE_FEATURES +libarchive"; fi
AM_CONDITIONAL(USE_LIBARCHIVE, test $with_libarchive != no)
-AS_IF([test x$cross_compiling != xyes && test -d /etc/kernel && test x$enable_triggers_only != xyes ],
+AS_IF([test x$cross_compiling != xyes && test -d /etc/kernel ],
[kernel_updates_default=yes],
[kernel_updates_default=no])
@@ -136,7 +122,7 @@ AC_ARG_ENABLE(kernel-updates,
enable_kernel_updates=${kernel_updates_default})
AM_CONDITIONAL(ENABLE_KERNEL_UPDATES, test $enable_kernel_updates != no)
-AS_IF([test x$cross_compiling != xyes && test -d /etc/grub.d && test x$enable_triggers_only != xyes ],
+AS_IF([test x$cross_compiling != xyes && test -d /etc/grub.d ],
[grub2_hook_default=yes],
[grub2_hook_default=no])
@@ -163,7 +149,6 @@ echo "
===============
- triggers only: $enable_triggers_only
embedded dependencies: $enable_embedded_dependencies
libsoup (retrieve remote HTTP repositories): $with_soup
libarchive (parse tar files directly): $with_libarchive
diff --git a/src/libostree/ostree.h b/src/libostree/ostree.h
index b5b50f3..3734af6 100644
--- a/src/libostree/ostree.h
+++ b/src/libostree/ostree.h
@@ -29,7 +29,6 @@
#include <ostree-mutable-tree.h>
#include <ostree-repo-file.h>
#include <ostree-traverse.h>
-#include <ostree-sysroot.h>
#include <ostree-diff.h>
#endif
diff --git a/src/ostree/ot-admin-builtins.h b/src/ostree/ot-admin-builtins.h
index 9924086..307e0e2 100644
--- a/src/ostree/ot-admin-builtins.h
+++ b/src/ostree/ot-admin-builtins.h
@@ -38,7 +38,6 @@ gboolean ot_admin_builtin_deploy (int argc, char **argv, OtAdminBuiltinOpts *adm
gboolean ot_admin_builtin_prune (int argc, char **argv, OtAdminBuiltinOpts *admin_opts, GError **error);
gboolean ot_admin_builtin_status (int argc, char **argv, OtAdminBuiltinOpts *admin_opts, GError **error);
gboolean ot_admin_builtin_diff (int argc, char **argv, OtAdminBuiltinOpts *admin_opts, GError **error);
-gboolean ot_admin_builtin_run_triggers (int argc, char **argv, OtAdminBuiltinOpts *admin_opts, GError
**error);
gboolean ot_admin_builtin_upgrade (int argc, char **argv, OtAdminBuiltinOpts *admin_opts, GError **error);
G_END_DECLS
diff --git a/src/ostree/ot-builtin-admin.c b/src/ostree/ot-builtin-admin.c
index b1dfac7..8b54f88 100644
--- a/src/ostree/ot-builtin-admin.c
+++ b/src/ostree/ot-builtin-admin.c
@@ -52,7 +52,6 @@ static OstreeAdminCommand admin_subcommands[] = {
{ "prune", ot_admin_builtin_prune },
{ "status", ot_admin_builtin_status },
{ "config-diff", ot_admin_builtin_diff },
- { "run-triggers", ot_admin_builtin_run_triggers },
{ NULL, NULL }
};
diff --git a/src/ostree/ot-builtin-checkout.c b/src/ostree/ot-builtin-checkout.c
index d88e01e..25433af 100644
--- a/src/ostree/ot-builtin-checkout.c
+++ b/src/ostree/ot-builtin-checkout.c
@@ -31,7 +31,6 @@
static gboolean opt_user_mode;
static gboolean opt_allow_noent;
-static gboolean opt_no_triggers;
static char *opt_subpath;
static gboolean opt_union;
static gboolean opt_from_stdin;
@@ -42,7 +41,6 @@ static GOptionEntry options[] = {
{ "subpath", 0, 0, G_OPTION_ARG_STRING, &opt_subpath, "Checkout sub-directory PATH", "PATH" },
{ "union", 0, 0, G_OPTION_ARG_NONE, &opt_union, "Keep existing directories, overwrite existing files",
NULL },
{ "allow-noent", 0, 0, G_OPTION_ARG_NONE, &opt_allow_noent, "Do nothing if specified path does not exist",
NULL },
- { "no-triggers", 0, 0, G_OPTION_ARG_NONE, &opt_no_triggers, "Don't run triggers", NULL },
{ "from-stdin", 0, 0, G_OPTION_ARG_NONE, &opt_from_stdin, "Process many checkouts from standard input",
NULL },
{ "from-file", 0, 0, G_OPTION_ARG_STRING, &opt_from_file, "Process many checkouts from input file", NULL },
{ NULL }
@@ -262,12 +260,6 @@ ostree_builtin_checkout (int argc, char **argv, GFile *repo_path, GError **error
if (!process_many_checkouts (repo, checkout_target, cancellable, error))
goto out;
-
- if (!opt_no_triggers)
- {
- if (!ostree_run_triggers_in_root (checkout_target, cancellable, error))
- goto out;
- }
}
else
{
@@ -286,13 +278,6 @@ ostree_builtin_checkout (int argc, char **argv, GFile *repo_path, GError **error
checkout_target_tmp ? checkout_target_tmp : checkout_target,
cancellable, error))
goto out;
-
- if (!opt_no_triggers)
- {
- if (!ostree_run_triggers_in_root (checkout_target_tmp ? checkout_target_tmp : checkout_target,
- cancellable, error))
- goto out;
- }
}
ret = TRUE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]