* [PATCH][v2] perf: fix the install-python_ext
@ 2015-08-26 5:58 rongqing.li
2015-08-26 10:16 ` Burton, Ross
2015-09-14 14:43 ` Saul Wold
0 siblings, 2 replies; 6+ messages in thread
From: rongqing.li @ 2015-08-26 5:58 UTC (permalink / raw)
To: openembedded-core
From: Roy Li <rongqing.li@windriver.com>
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
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
meta/recipes-kernel/perf/perf.bb | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index b18e474..adb3a2c 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -44,6 +44,7 @@ export STAGING_INCDIR
export STAGING_LIBDIR
export BUILD_SYS
export HOST_SYS
+export PYTHON_SITEPACKAGES_DIR
#kernel 3.1+ supports WERROR to disable warnings as errors
export WERROR = "0"
@@ -111,7 +112,7 @@ do_install() {
unset CFLAGS
oe_runmake DESTDIR=${D} install
# we are checking for this make target to be compatible with older perf versions
- if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0" ]; then
+ if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
oe_runmake DESTDIR=${D} install-python_ext
fi
}
@@ -143,7 +144,12 @@ do_configure_prepend () {
if [ -e "${S}/tools/perf/Makefile.perf" ]; then
sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
${S}/tools/perf/Makefile.perf
+ sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
+ ${S}/tools/perf/Makefile.perf
fi
+ sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
+ ${S}/tools/perf/Makefile
+
if [ -e "${S}/tools/build/Makefile.build" ]; then
sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
${S}/tools/build/Makefile.build
--
1.9.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH][v2] perf: fix the install-python_ext
2015-08-26 5:58 [PATCH][v2] perf: fix the install-python_ext rongqing.li
@ 2015-08-26 10:16 ` Burton, Ross
2015-08-27 1:18 ` Rongqing Li
2015-09-14 14:43 ` Saul Wold
1 sibling, 1 reply; 6+ messages in thread
From: Burton, Ross @ 2015-08-26 10:16 UTC (permalink / raw)
To: rongqing.li; +Cc: OE-core
[-- Attachment #1: Type: text/plain, Size: 284 bytes --]
On 26 August 2015 at 06:58, <rongqing.li@windriver.com> wrote:
> +export PYTHON_SITEPACKAGES_DIR
>
Why do you export this and then use \$(PYTHON_SITEPACKAGES_DIR), isn't just
using ${PYTHON_SITEPACKAGES_DIR} directly so the expansion is performed by
bitbake neater?
Ross
[-- Attachment #2: Type: text/html, Size: 698 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][v2] perf: fix the install-python_ext
2015-08-26 10:16 ` Burton, Ross
@ 2015-08-27 1:18 ` Rongqing Li
2015-09-08 3:05 ` Rongqing Li
0 siblings, 1 reply; 6+ messages in thread
From: Rongqing Li @ 2015-08-27 1:18 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
On 2015年08月26日 18:16, Burton, Ross wrote:
>
> On 26 August 2015 at 06:58, <rongqing.li@windriver.com
> <mailto:rongqing.li@windriver.com>> wrote:
>
> +export PYTHON_SITEPACKAGES_DIR
>
>
> Why do you export this and then use \$(PYTHON_SITEPACKAGES_DIR), isn't
> just using ${PYTHON_SITEPACKAGES_DIR} directly so the expansion is
> performed by bitbake neater?
>
> Ross
keep it same as original codes.
other reason is that this change is under work-shared dir, it will see
puzzle if see the source code from other package, like linux kernel,
--
Best Reagrds,
Roy | RongQing Li
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][v2] perf: fix the install-python_ext
2015-08-27 1:18 ` Rongqing Li
@ 2015-09-08 3:05 ` Rongqing Li
0 siblings, 0 replies; 6+ messages in thread
From: Rongqing Li @ 2015-09-08 3:05 UTC (permalink / raw)
To: Burton, Ross; +Cc: OE-core
ping
-Roy
On 2015年08月27日 09:18, Rongqing Li wrote:
>
>
> On 2015年08月26日 18:16, Burton, Ross wrote:
>>
>> On 26 August 2015 at 06:58, <rongqing.li@windriver.com
>> <mailto:rongqing.li@windriver.com>> wrote:
>>
>> +export PYTHON_SITEPACKAGES_DIR
>>
>>
>> Why do you export this and then use \$(PYTHON_SITEPACKAGES_DIR), isn't
>> just using ${PYTHON_SITEPACKAGES_DIR} directly so the expansion is
>> performed by bitbake neater?
>>
>> Ross
>
>
> keep it same as original codes.
>
> other reason is that this change is under work-shared dir, it will see
> puzzle if see the source code from other package, like linux kernel,
>
>
--
Best Reagrds,
Roy | RongQing Li
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][v2] perf: fix the install-python_ext
2015-08-26 5:58 [PATCH][v2] perf: fix the install-python_ext rongqing.li
2015-08-26 10:16 ` Burton, Ross
@ 2015-09-14 14:43 ` Saul Wold
2015-09-15 1:08 ` Rongqing Li
1 sibling, 1 reply; 6+ messages in thread
From: Saul Wold @ 2015-09-14 14:43 UTC (permalink / raw)
To: rongqing.li, openembedded-core
On 08/25/2015 10:58 PM, rongqing.li@windriver.com wrote:
> From: Roy Li <rongqing.li@windriver.com>
>
> 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
>
This patch actually seems to introduce this failure,
https://autobuilder.yoctoproject.org/main/builders/nightly-fsl-arm/builds/494/steps/BuildImages/logs/stdio
This needs to be addressed.
Sau!
> Signed-off-by: Roy Li <rongqing.li@windriver.com>
> ---
> meta/recipes-kernel/perf/perf.bb | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
> index b18e474..adb3a2c 100644
> --- a/meta/recipes-kernel/perf/perf.bb
> +++ b/meta/recipes-kernel/perf/perf.bb
> @@ -44,6 +44,7 @@ export STAGING_INCDIR
> export STAGING_LIBDIR
> export BUILD_SYS
> export HOST_SYS
> +export PYTHON_SITEPACKAGES_DIR
>
> #kernel 3.1+ supports WERROR to disable warnings as errors
> export WERROR = "0"
> @@ -111,7 +112,7 @@ do_install() {
> unset CFLAGS
> oe_runmake DESTDIR=${D} install
> # we are checking for this make target to be compatible with older perf versions
> - if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0" ]; then
> + if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1" ] && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
> oe_runmake DESTDIR=${D} install-python_ext
> fi
> }
> @@ -143,7 +144,12 @@ do_configure_prepend () {
> if [ -e "${S}/tools/perf/Makefile.perf" ]; then
> sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
> ${S}/tools/perf/Makefile.perf
> + sed -i -e "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
> + ${S}/tools/perf/Makefile.perf
> fi
> + sed -i -e "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr' --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
> + ${S}/tools/perf/Makefile
> +
> if [ -e "${S}/tools/build/Makefile.build" ]; then
> sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
> ${S}/tools/build/Makefile.build
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH][v2] perf: fix the install-python_ext
2015-09-14 14:43 ` Saul Wold
@ 2015-09-15 1:08 ` Rongqing Li
0 siblings, 0 replies; 6+ messages in thread
From: Rongqing Li @ 2015-09-15 1:08 UTC (permalink / raw)
To: Saul Wold, openembedded-core
On 2015年09月14日 22:43, Saul Wold wrote:
> On 08/25/2015 10:58 PM, rongqing.li@windriver.com wrote:
>> From: Roy Li <rongqing.li@windriver.com>
>>
>> 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
>>
>>
>
> This patch actually seems to introduce this failure,
>
> https://autobuilder.yoctoproject.org/main/builders/nightly-fsl-arm/builds/494/steps/BuildImages/logs/stdio
>
>
> This needs to be addressed.
>
> Sau!
Ok, I will see it
-Roy
>
>> Signed-off-by: Roy Li <rongqing.li@windriver.com>
>> ---
>> meta/recipes-kernel/perf/perf.bb | 8 +++++++-
>> 1 file changed, 7 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-kernel/perf/perf.bb
>> b/meta/recipes-kernel/perf/perf.bb
>> index b18e474..adb3a2c 100644
>> --- a/meta/recipes-kernel/perf/perf.bb
>> +++ b/meta/recipes-kernel/perf/perf.bb
>> @@ -44,6 +44,7 @@ export STAGING_INCDIR
>> export STAGING_LIBDIR
>> export BUILD_SYS
>> export HOST_SYS
>> +export PYTHON_SITEPACKAGES_DIR
>>
>> #kernel 3.1+ supports WERROR to disable warnings as errors
>> export WERROR = "0"
>> @@ -111,7 +112,7 @@ do_install() {
>> unset CFLAGS
>> oe_runmake DESTDIR=${D} install
>> # we are checking for this make target to be compatible with
>> older perf versions
>> - if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1"
>> -a $(grep install-python_ext ${S}/tools/perf/Makefile) = "0" ]; then
>> + if [ "${@perf_feature_enabled('perf-scripting', 1, 0, d)}" = "1"
>> ] && grep -q install-python_ext ${S}/tools/perf/Makefile*; then
>> oe_runmake DESTDIR=${D} install-python_ext
>> fi
>> }
>> @@ -143,7 +144,12 @@ do_configure_prepend () {
>> if [ -e "${S}/tools/perf/Makefile.perf" ]; then
>> sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
>> ${S}/tools/perf/Makefile.perf
>> + sed -i -e
>> "s,prefix='\$(DESTDIR_SQ)/usr'$,prefix='\$(DESTDIR_SQ)/usr'
>> --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
>> + ${S}/tools/perf/Makefile.perf
>> fi
>> + sed -i -e
>> "s,--root='/\$(DESTDIR_SQ)',--prefix='\$(DESTDIR_SQ)/usr'
>> --install-lib='\$(DESTDIR)\$(PYTHON_SITEPACKAGES_DIR)',g" \
>> + ${S}/tools/perf/Makefile
>> +
>> if [ -e "${S}/tools/build/Makefile.build" ]; then
>> sed -i -e 's,\ .config-detected, $(OUTPUT)/config-detected,g' \
>> ${S}/tools/build/Makefile.build
>>
>
>
--
Best Reagrds,
Roy | RongQing Li
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-09-15 1:08 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-26 5:58 [PATCH][v2] perf: fix the install-python_ext rongqing.li
2015-08-26 10:16 ` Burton, Ross
2015-08-27 1:18 ` Rongqing Li
2015-09-08 3:05 ` Rongqing Li
2015-09-14 14:43 ` Saul Wold
2015-09-15 1:08 ` Rongqing Li
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.