diff options
author | Mark Asselstine <mark.asselstine@windriver.com> | 2013-08-12 17:03:47 -0400 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2013-08-12 23:46:49 -0400 |
commit | a4565b8ce7614b3a6453220c31a4c103c9d857ef (patch) | |
tree | 46fc744e2f592cf1218433099ad2596d6d01c059 | |
parent | 7dfc79162c6745a0783e18f59d7f59f61dbb96cf (diff) |
libvirt: fix python script's improper paths
libvirt generates several python scripts using its python/generator.py
script. This uses the PYTHON variable, which in our case will be a
full path to the sysroot that will not exist on the target. For this
we are patching libvirt to allow for (but not require) TARGET_PYTHON
to be defined and used when generating these python scripts.
Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
-rw-r--r-- | recipes-extended/libvirt/libvirt-python.inc | 4 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt/libvirt-allow-location-of-python-on-the-target-to-be.patch | 53 |
2 files changed, 57 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc index d4cc5f3..63e0657 100644 --- a/recipes-extended/libvirt/libvirt-python.inc +++ b/recipes-extended/libvirt/libvirt-python.inc @@ -15,3 +15,7 @@ FILES_${PN}-python-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}" + +EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python" + +SRC_URI += "file://libvirt-allow-location-of-python-on-the-target-to-be.patch"
\ No newline at end of file diff --git a/recipes-extended/libvirt/libvirt/libvirt-allow-location-of-python-on-the-target-to-be.patch b/recipes-extended/libvirt/libvirt/libvirt-allow-location-of-python-on-the-target-to-be.patch new file mode 100644 index 0000000..6fff8ea --- /dev/null +++ b/recipes-extended/libvirt/libvirt/libvirt-allow-location-of-python-on-the-target-to-be.patch @@ -0,0 +1,53 @@ +From 44e1046619457c709a0bb4efaa4ad983d9b81cbc Mon Sep 17 00:00:00 2001 +From: Mark Asselstine <mark.asselstine@windriver.com> +Date: Mon, 12 Aug 2013 16:22:56 -0400 +Subject: [PATCH] libvirt: allow location of python on the target to be + specified + +Allow TARGET_PYTHON to be passed to configure. TARGET_PYTHON will be +passed to generator.py where it is used to create the sh.bang line at +the top of various generated scripts. This allows separation between +what is used to build vs. install. The default behavior is to leave +TARGET_PYTHON == PYTHON unless TARGET_PYTHON is passed to configure. + +Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> +--- + configure.ac | 8 ++++++++ + python/Makefile.am | 2 +- + 2 files changed, 9 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 35a5d76..c1a27f8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1965,6 +1965,14 @@ AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"]) + AC_SUBST([PYTHON_VERSION]) + AC_SUBST([PYTHON_INCLUDES]) + ++if test "$TARGET_PYTHON"; then ++ TARGET_PYTHON=$TARGET_PYTHON ++else ++ TARGET_PYTHON=$PYTHON ++fi ++AC_SUBST(TARGET_PYTHON) ++ ++ + dnl Allow perl overrides + AC_PATH_PROG([PERL], [perl]) + +diff --git a/python/Makefile.am b/python/Makefile.am +index 7eb42c6..8b9b480 100644 +--- a/python/Makefile.am ++++ b/python/Makefile.am +@@ -131,7 +131,7 @@ $(GENERATE).stamp: $(srcdir)/$(GENERATE) \ + $(QEMU_API_DESC) \ + $(LXC_API_DESC) \ + $(CLASSES_EXTRA) +- $(AM_V_GEN)$(PYTHON) $(srcdir)/$(GENERATE) $(PYTHON) && \ ++ $(AM_V_GEN)$(PYTHON) $(srcdir)/$(GENERATE) $(TARGET_PYTHON) && \ + touch $@ + + $(GENERATED) $(QEMU_GENERATED) $(LXC_GENERATED): $(GENERATE).stamp +-- +1.8.1.2 + |