summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Asselstine <mark.asselstine@windriver.com>2013-08-12 17:03:47 -0400
committerBruce Ashfield <bruce.ashfield@windriver.com>2013-08-12 23:46:49 -0400
commita4565b8ce7614b3a6453220c31a4c103c9d857ef (patch)
tree46fc744e2f592cf1218433099ad2596d6d01c059
parent7dfc79162c6745a0783e18f59d7f59f61dbb96cf (diff)
downloadmeta-virtualization-a4565b8ce7614b3a6453220c31a4c103c9d857ef.tar.gz
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.inc4
-rw-r--r--recipes-extended/libvirt/libvirt/libvirt-allow-location-of-python-on-the-target-to-be.patch53
2 files changed, 57 insertions, 0 deletions
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
index d4cc5f35..63e06577 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"
15FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la" 15FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
16FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" 16FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
17FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}" 17FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
18
19EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python"
20
21SRC_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 00000000..6fff8ea0
--- /dev/null
+++ b/recipes-extended/libvirt/libvirt/libvirt-allow-location-of-python-on-the-target-to-be.patch
@@ -0,0 +1,53 @@
1From 44e1046619457c709a0bb4efaa4ad983d9b81cbc Mon Sep 17 00:00:00 2001
2From: Mark Asselstine <mark.asselstine@windriver.com>
3Date: Mon, 12 Aug 2013 16:22:56 -0400
4Subject: [PATCH] libvirt: allow location of python on the target to be
5 specified
6
7Allow TARGET_PYTHON to be passed to configure. TARGET_PYTHON will be
8passed to generator.py where it is used to create the sh.bang line at
9the top of various generated scripts. This allows separation between
10what is used to build vs. install. The default behavior is to leave
11TARGET_PYTHON == PYTHON unless TARGET_PYTHON is passed to configure.
12
13Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
14---
15 configure.ac | 8 ++++++++
16 python/Makefile.am | 2 +-
17 2 files changed, 9 insertions(+), 1 deletion(-)
18
19diff --git a/configure.ac b/configure.ac
20index 35a5d76..c1a27f8 100644
21--- a/configure.ac
22+++ b/configure.ac
23@@ -1965,6 +1965,14 @@ AM_CONDITIONAL([WITH_PYTHON], [test "$with_python" = "yes"])
24 AC_SUBST([PYTHON_VERSION])
25 AC_SUBST([PYTHON_INCLUDES])
26
27+if test "$TARGET_PYTHON"; then
28+ TARGET_PYTHON=$TARGET_PYTHON
29+else
30+ TARGET_PYTHON=$PYTHON
31+fi
32+AC_SUBST(TARGET_PYTHON)
33+
34+
35 dnl Allow perl overrides
36 AC_PATH_PROG([PERL], [perl])
37
38diff --git a/python/Makefile.am b/python/Makefile.am
39index 7eb42c6..8b9b480 100644
40--- a/python/Makefile.am
41+++ b/python/Makefile.am
42@@ -131,7 +131,7 @@ $(GENERATE).stamp: $(srcdir)/$(GENERATE) \
43 $(QEMU_API_DESC) \
44 $(LXC_API_DESC) \
45 $(CLASSES_EXTRA)
46- $(AM_V_GEN)$(PYTHON) $(srcdir)/$(GENERATE) $(PYTHON) && \
47+ $(AM_V_GEN)$(PYTHON) $(srcdir)/$(GENERATE) $(TARGET_PYTHON) && \
48 touch $@
49
50 $(GENERATED) $(QEMU_GENERATED) $(LXC_GENERATED): $(GENERATE).stamp
51--
521.8.1.2
53