diff options
author | Roy Li <rongqing.li@windriver.com> | 2015-08-26 13:58:17 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-09-12 22:48:32 +0100 |
commit | 4c73aaf09e5cebe6f88d267b3040980263996fea (patch) | |
tree | 38186bb83df6cf0bbb33da224a827fc2a70500f4 /meta/recipes-kernel/perf | |
parent | d0abea0133ab3090ee7b92d133dabdd1b6b70a28 (diff) | |
download | poky-4c73aaf09e5cebe6f88d267b3040980263996fea.tar.gz |
perf: fix the install-python_ext
1. $(grep xxx xxx) never returns 0, it maybe return empty or string, and
can not compare with 0, this fixes that python module never are installed.
2. python library is installed into /usr/lib/ by default, but we expect
it is installed into ${libdir}, so add --install-lib parameter for python
setup.py to set the library dir;
this fixes not shipped warning, since python modules are installed into
/usr/lib/, but FILE_${PN}-python expects it is under ${libdir}, which is
/usr/lib64/ for 64bit machine
3. the makefile target install-python_ext is moved from Makefile to
Makefile.perf from linux v3.13, so match install-python_ext in Makefile.*
and --root='/\$(DESTDIR_SQ)' before linux v3.13 will install the target
python library to native sysroot, so replace it with --prefix as after linux
3.13;
this fixes not shipped warning, and install target files to native dir, like
below:
ERROR: QA Issue: perf: Files/directories were installed but not shipped in any package:
/home
/home/pokybuild
/home/pokybuild/yocto-autobuilder
/home/pokybuild/yocto-autobuilder/yocto-worker
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf.so
/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-fsl-ppc-lsb/build/build/tmp/sysroots/x86_64-linux/usr/lib/python2.7/site-packages/perf-0.1-py2.7.egg-info
(From OE-Core rev: 43f965061f8af4c4537e9d9c0257253e613a616d)
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/perf')
-rw-r--r-- | meta/recipes-kernel/perf/perf.bb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb index b18e474de9..adb3a2cdcf 100644 --- a/meta/recipes-kernel/perf/perf.bb +++ b/meta/recipes-kernel/perf/perf.bb | |||
@@ -44,6 +44,7 @@ export STAGING_INCDIR | |||
44 | export STAGING_LIBDIR | 44 | export STAGING_LIBDIR |
45 | export BUILD_SYS | 45 | export BUILD_SYS |
46 | export HOST_SYS | 46 | export HOST_SYS |
47 | export PYTHON_SITEPACKAGES_DIR | ||
47 | 48 | ||
48 | #kernel 3.1+ supports WERROR to disable warnings as errors | 49 | #kernel 3.1+ supports WERROR to disable warnings as errors |
49 | export WERROR = "0" | 50 | export WERROR = "0" |
@@ -111,7 +112,7 @@ do_install() { | |||
111 | unset CFLAGS | 112 | unset CFLAGS |
112 | oe_runmake DESTDIR=${D} install | 113 | oe_runmake DESTDIR=${D} install |
113 | # we are checking for this make target to be compatible with older perf versions | 114 | # we are checking for this make target to be compatible with older perf versions |
114 | if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0" ]; then | 115 | if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && grep -q install-python_ext ${S}/tools/perf/Makefile*; then |
115 | oe_runmake DESTDIR=${D} install-python_ext | 116 | oe_runmake DESTDIR=${D} install-python_ext |
116 | fi | 117 | fi |
117 | } | 118 | } |
@@ -143,7 +144,12 @@ do_configure_prepend () { | |||
143 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then | 144 | if [ -e "${S}/tools/perf/Makefile.perf" ]; then |
144 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ | 145 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ |
145 | ${S}/tools/perf/Makefile.perf | 146 | ${S}/tools/perf/Makefile.perf |
147 | sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \ | ||
148 | ${S}/tools/perf/Makefile.perf | ||
146 | fi | 149 | fi |
150 | sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \ | ||
151 | ${S}/tools/perf/Makefile | ||
152 | |||
147 | if [ -e "${S}/tools/build/Makefile.build" ]; then | 153 | if [ -e "${S}/tools/build/Makefile.build" ]; then |
148 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ | 154 | sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \ |
149 | ${S}/tools/build/Makefile.build | 155 | ${S}/tools/build/Makefile.build |