Put hawkey stuff behind --enable-patched-hawkey-and-libsolv

Right now we depend on two patches.
This commit is contained in:
Colin Walters 2014-03-28 22:04:52 -04:00
parent 50bd970791
commit 0a88e292f2
4 changed files with 21 additions and 2 deletions

View File

@ -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)

View File

@ -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
"

View File

@ -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");
}

View File

@ -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");
}