[systemd-commits] 2 commits - configure.ac src/core
Lennart Poettering
lennart at kemper.freedesktop.org
Mon Oct 15 17:24:48 PDT 2012
configure.ac | 31 +++++++++++++++++++------------
src/core/swap.c | 19 -------------------
2 files changed, 19 insertions(+), 31 deletions(-)
New commits:
commit 78fbaacac004f912ec84b6f57d0bc656c3c95439
Author: Wulf C. Krueger <philantrop at exherbo.org>
Date: Sat Oct 6 11:37:44 2012 +0200
configure.ac: Add a --without-python option.
Being able to be explicit about Python support (in addition to the
default of auto-detecting it) and acting upon the result, specifying
it as an option gains us more control about both dependencies and
the resulting build.
Furthermore, relying purely on auto-detection can lead to problems for
source-based distros. E. g. systemd being built before *both* 32-bit &
64-bit ABIs are installed will lead to build failures as systemd's
build system will pick up either 32-/64-bit Python, conclude both are
available and fail if that's not the case.
diff --git a/configure.ac b/configure.ac
index fe8137d..1bb657d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,19 +92,26 @@ fi
# we use python to build the man page index, and for systemd-python
have_python=no
have_python_devel=no
-AM_PATH_PYTHON(,, [:])
-if test "$PYTHON" != : ; then
- have_python=yes
- AC_PATH_PROG([PYTHON_CONFIG], python-config)
-
- if test -n "$PYTHON_CONFIG" ; then
- have_python_devel=yes
- PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
- PYTHON_LIBS="`$PYTHON_CONFIG --libs`"
- AC_SUBST(PYTHON_CFLAGS)
- AC_SUBST(PYTHON_LIBS)
+
+AC_ARG_WITH([python],
+ [AS_HELP_STRING([--without-python], [Disable building the man page index and systemd-python (default: test)])])
+
+AS_IF([test "x$with_python" != "xno"], [
+ AM_PATH_PYTHON(,, [:])
+ if test "$PYTHON" != : ; then
+ have_python=yes
+ AC_PATH_PROG([PYTHON_CONFIG], python-config)
+
+ if test -n "$PYTHON_CONFIG" ; then
+ have_python_devel=yes
+ PYTHON_CFLAGS="`$PYTHON_CONFIG --cflags`"
+ PYTHON_LIBS="`$PYTHON_CONFIG --libs`"
+ AC_SUBST(PYTHON_CFLAGS)
+ AC_SUBST(PYTHON_LIBS)
+ fi
fi
-fi
+])
+
AM_CONDITIONAL([HAVE_PYTHON], [test "$have_python" = "yes"])
AM_CONDITIONAL([HAVE_PYTHON_DEVEL], [test "$have_python_devel" = "yes"])
commit fd59a381e35edfbeb868143d76181be60df9c22b
Author: Thomas Bächler <thomas at archlinux.org>
Date: Sat Oct 6 01:11:53 2012 +0200
core/swap.c: Do not add Before=swap.target to swap units.
The fstab generator adds Before=swap.target by default, and when creating
a custom .swap unit, you can also add Before=swap.target to the unit.
However, it is impossible to not have this ordering dependency right now.
Virtually all existing setups likely use the fstab generator, so this
change is unlikely to break anything.
diff --git a/src/core/swap.c b/src/core/swap.c
index b4f53b7..c708b7f 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -165,22 +165,6 @@ static int swap_add_mount_links(Swap *s) {
return 0;
}
-static int swap_add_target_links(Swap *s) {
- Unit *tu;
- int r;
-
- assert(s);
-
- if (!s->from_fragment)
- return 0;
-
- r = manager_load_unit(UNIT(s)->manager, SPECIAL_SWAP_TARGET, NULL, NULL, &tu);
- if (r < 0)
- return r;
-
- return unit_add_dependency(UNIT(s), UNIT_BEFORE, tu, true);
-}
-
static int swap_add_device_links(Swap *s) {
SwapParameters *p;
@@ -291,9 +275,6 @@ static int swap_load(Unit *u) {
if ((r = swap_add_mount_links(s)) < 0)
return r;
- if ((r = swap_add_target_links(s)) < 0)
- return r;
-
if ((r = unit_add_default_cgroups(u)) < 0)
return r;
More information about the systemd-commits
mailing list