From 0a88e292f23222b2a3deb12610b67c6631f85628 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 28 Mar 2014 22:04:52 -0400 Subject: [PATCH] Put hawkey stuff behind --enable-patched-hawkey-and-libsolv Right now we depend on two patches. --- Makefile-rpm-ostree.am | 8 ++++++-- configure.ac | 11 +++++++++++ src/rpmostree-builtin-rollback.c | 2 ++ src/rpmostree-builtin-upgrade.c | 2 ++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Makefile-rpm-ostree.am b/Makefile-rpm-ostree.am index 5c20f47d..396d555c 100644 --- a/Makefile-rpm-ostree.am +++ b/Makefile-rpm-ostree.am @@ -24,11 +24,15 @@ noinst_LTLIBRARIES += librpmostree.la librpmostree_la_SOURCES = \ src/rpmostree-postprocess.c \ src/rpmostree-postprocess.h \ - src/rpmostree-treepkgdiff.c \ - src/rpmostree-treepkgdiff.h \ src/hif-utils.c \ src/hif-utils.h \ $(NULL) +if BUILDOPT_PATCHED_HAWKEY_AND_LIBSOLV +librpmostree_la_SOURCES += \ + src/rpmostree-treepkgdiff.c \ + src/rpmostree-treepkgdiff.h \ + $(NULL) +endif librpmostree_la_CFLAGS = $(AM_CFLAGS) -I$(srcdir)/src -DPKGLIBDIR=\"$(pkglibdir)\" $(PKGDEP_RPMOSTREE_CFLAGS) librpmostree_la_LIBADD = $(AM_LDFLAGS) $(PKGDEP_RPMOSTREE_LIBS) diff --git a/configure.ac b/configure.ac index 062b2df5..e780202c 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,15 @@ AC_PATH_PROG([XSLTPROC], [xsltproc]) GOBJECT_INTROSPECTION_REQUIRE([1.34.0]) +AC_ARG_ENABLE(patched-hawkey-and-libsolv, + AS_HELP_STRING([--enable-patched-hawkey], + [Assert that our copy of hawkey and libsolv understand /usr/share/rpm]),, + [enable_patched_hawkey_and_libsolv=no]) +AM_CONDITIONAL(BUILDOPT_PATCHED_HAWKEY_AND_LIBSOLV, [test x$enable_patched_hawkey_and_libsolv = xyes]) +AS_IF([test x$enable_patched_hawkey_and_libsolv = xyes], [ + AC_DEFINE(HAVE_PATCHED_HAWKEY_AND_LIBSOLV, 1, [Define if we have patched hawkey and libsolv]) +]) + AC_CONFIG_FILES([ Makefile ]) @@ -44,4 +53,6 @@ AC_OUTPUT echo " $PACKAGE $VERSION + + patched hawkey: $enable_patched_hawkey_and_libsolv " diff --git a/src/rpmostree-builtin-rollback.c b/src/rpmostree-builtin-rollback.c index c2ed5668..bcdbdd39 100644 --- a/src/rpmostree-builtin-rollback.c +++ b/src/rpmostree-builtin-rollback.c @@ -126,8 +126,10 @@ rpmostree_builtin_rollback (int argc, "systemctl", "reboot", NULL); else { +#ifdef HAVE_PATCHED_HAWKEY_AND_LIBSOLV if (!rpmostree_print_treepkg_diff (sysroot, cancellable, error)) goto out; +#endif g_print ("Sucessfully reset deployment order; run \"systemctl reboot\" to start a reboot\n"); } diff --git a/src/rpmostree-builtin-upgrade.c b/src/rpmostree-builtin-upgrade.c index dc2517b0..3beb89e4 100644 --- a/src/rpmostree-builtin-upgrade.c +++ b/src/rpmostree-builtin-upgrade.c @@ -153,8 +153,10 @@ rpmostree_builtin_upgrade (int argc, "systemctl", "reboot", NULL); else { +#ifdef HAVE_PATCHED_HAWKEY_AND_LIBSOLV if (!rpmostree_print_treepkg_diff (sysroot, cancellable, error)) goto out; +#endif g_print ("Updates prepared for next boot; run \"systemctl reboot\" to start a reboot\n"); }