summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-03 23:23:09 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-03 23:23:09 +0100
commit0843607a2b49dd1a240ea54236d6a7df1aa6a218 (patch)
tree3575d4b016ced044147d94af643194043b0e092d
parent3e38d633c966e62135df7a49a20a7509b5a81dcc (diff)
downloadpoky-0843607a2b49dd1a240ea54236d6a7df1aa6a218.tar.gz
rpm: Change the way the python version is determined so its sane and works with checksumming
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
-rw-r--r--meta/conf/distro/include/poky-fixed-revisions.inc5
-rw-r--r--meta/recipes-devtools/rpm/rpm_5.1.10.bb23
2 files changed, 10 insertions, 18 deletions
diff --git a/meta/conf/distro/include/poky-fixed-revisions.inc b/meta/conf/distro/include/poky-fixed-revisions.inc
index f3e0556544..c2874a3b36 100644
--- a/meta/conf/distro/include/poky-fixed-revisions.inc
+++ b/meta/conf/distro/include/poky-fixed-revisions.inc
@@ -29,6 +29,11 @@ PREFERRED_VERSION_hal-info ?= "20091130"
29PREFERRED_VERSION_udev ?= "158" 29PREFERRED_VERSION_udev ?= "158"
30PREFERRED_VERSION_wpa-supplicant ?= "0.6.10" 30PREFERRED_VERSION_wpa-supplicant ?= "0.6.10"
31 31
32# Force the python versions in one place
33PYTHON_BASEVERSION ?= "2.6"
34PREFERRED_VERSION_python ?= "2.6.5"
35PREFERRED_VERSION_python-native ?= "2.6.5"
36
32 37
33# 38#
34# meta-moblin package PREFERRED_VERSIONS 39# meta-moblin package PREFERRED_VERSIONS
diff --git a/meta/recipes-devtools/rpm/rpm_5.1.10.bb b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
index fc2e837b9a..4cf0fd8777 100644
--- a/meta/recipes-devtools/rpm/rpm_5.1.10.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.1.10.bb
@@ -19,9 +19,9 @@ acpaths = "-I ${S}/db/dist/aclocal -I ${S}/db/dist/aclocal_java"
19# Specify the default rpm macros in terms of adjustable variables 19# Specify the default rpm macros in terms of adjustable variables
20rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros" 20rpm_macros = "%{_usrlibrpm}/macros:%{_usrlibrpm}/poky/macros:%{_usrlibrpm}/poky/%{_target}/macros:~/.oerpmmacros"
21 21
22EXTRA_OECONF = "--with-python=$PYTHONVER \ 22EXTRA_OECONF = "--with-python=${PYTHON_BASEVERSION} \
23 --with-python-inc-dir=${STAGING_INCDIR}/python$PYTHONVER \ 23 --with-python-inc-dir=${STAGING_INCDIR}/python${PYTHON_BASEVERSION} \
24 --with-python-lib-dir=${libdir}/python$PYTHONVER \ 24 --with-python-lib-dir=${libdir}/python${PYTHON_BASEVERSION} \
25 --with-db=internal \ 25 --with-db=internal \
26 --with-db-tools-integrated \ 26 --with-db-tools-integrated \
27 --with-libelf \ 27 --with-libelf \
@@ -122,22 +122,9 @@ do_install_append() {
122 122
123 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh 123 install -m 0755 ${WORKDIR}/perfile_rpmdeps.sh ${D}/${libdir}/rpm/perfile_rpmdeps.sh
124 124
125 mv ${D}/${libdir}/python$PYTHONVER/rpm/${HOST_SYS}-__init__.py \ 125 mv ${D}/${libdir}/python${PYTHON_BASEVERSION}/rpm/${HOST_SYS}-__init__.py \
126 ${D}/${libdir}/python$PYTHONVER/rpm/__init__.py 126 ${D}/${libdir}/python${PYTHON_BASEVERSION}/rpm/__init__.py
127 127
128} 128}
129 129
130def rpm_python_version(d):
131 import os, bb
132 staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 )
133 if os.path.exists( "%s/python2.6" % staging_incdir ): return "2.6"
134 if os.path.exists( "%s/python2.5" % staging_incdir ): return "2.5"
135 if os.path.exists( "%s/python2.4" % staging_incdir ): return "2.4"
136 if os.path.exists( "%s/python2.3" % staging_incdir ): return "2.3"
137 raise "No Python in STAGING_INCDIR. Forgot to build python/python-native?"
138
139# Use a shell variable here since otherwise gettext trys to expand this at
140# parse time when it manipulates EXTRA_OECONF which fails
141export PYTHONVER = "${@rpm_python_version(d)}"
142
143BBCLASSEXTEND = "native" 130BBCLASSEXTEND = "native"