[OE-core] another cleanup: "grep ... >/dev/null" -> "grep -q"?

2017-03-25 Thread Robert P. J. Day

  something else that grates on me:

$ grep "grep.*/dev/null" *
autotools.bbclass:  if grep "^[[:space:]]*AM_GLIB_GNU_GETTEXT" 
$CONFIGURE_AC >/dev/null; then
autotools.bbclass:  if grep "sed.*POTFILES" $CONFIGURE_AC 
>/dev/null; then
autotools.bbclass:  elif grep "^[[:space:]]*AM_GNU_GETTEXT" 
$CONFIGURE_AC >/dev/null; then
autotools.bbclass:  if grep "^[[:space:]]*[AI][CT]_PROG_INTLTOOL" 
$CONFIGURE_AC >/dev/null; then
insane.bbclass:statement = "grep -e '%s/[^ :]\{1,\}/[^ :]\{1,\}' %s 
> /dev/null" % (exec_prefix, path)
insane.bbclass:statement = "grep -e 'CROSS COMPILE Badness:' -e 'is 
unsafe for cross-compilation' %s > /dev/null" % compilelog
insane.bbclass:statement = "grep -e 'CROSS COMPILE Badness:' -e 'is 
unsafe for cross-compilation' %s > /dev/null" % installlog
insane.bbclass:gnu = "grep \"^[[:space:]]*AM_GNU_GETTEXT\" %s 
>/dev/null" % config
rootfs-postcommands.bbclass:if grep -q DROPBEAR_EXTRA_ARGS 
${IMAGE_ROOTFS}${sysconfdir}/default/dropbear 2>/dev/null ; then
utils.bbclass:  if echo "$destpath/" | egrep '^${STAGING_LIBDIR}/' >/dev/null
$

  1) can most of those be simplified with "grep -q"?
  2) is there any need for "egrep" in that last match?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] ✗ patchtest: failure for classes: Replace "if test" file tests with POSIX file tests

2017-03-25 Thread Patchwork
== Series Details ==

Series: classes: Replace "if test" file tests with POSIX file tests
Revision: 1
URL   : https://patchwork.openembedded.org/series/5977/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at 552bd782d9)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] classes: Replace "if test" file tests with POSIX file tests

2017-03-25 Thread Robert P. J. Day

In entire meta/classes/ directory, replace shell tests of the form
"if test -? ..." with POSIX tests of the form "if [ -? ...

Signed-off-by: Robert P. J. Day 

---

  as i cannot abide those silly "if test" constructs, i zipped through
and changed them to POSIX form. is there any objection to this kind of
cleanup? next up ... all those "x${VAR} = x" tests ...


diff --git a/meta/classes/distutils-tools.bbclass 
b/meta/classes/distutils-tools.bbclass
index 3ef9cc5..4243681 100644
--- a/meta/classes/distutils-tools.bbclass
+++ b/meta/classes/distutils-tools.bbclass
@@ -44,14 +44,14 @@ distutils_do_install() {
 done

 echo "Step 4 of ${PN} Install ..."
-if test -e ${D}${bindir} ; then
+if [ -e ${D}${bindir} ]; then
 for i in ${D}${bindir}/* ; do \
 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
 done
 fi

 echo "Step 4 of ${PN} Install ..."
-if test -e ${D}${sbindir}; then
+if [ -e ${D}${sbindir} ]; then
 for i in ${D}${sbindir}/* ; do \
 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
 done
@@ -63,7 +63,7 @@ distutils_do_install() {
 #
 # FIXME: Bandaid against wrong datadir computation
 #
-if test -e ${D}${datadir}/share; then
+if [ -e ${D}${datadir}/share ]; then
 mv -f ${D}${datadir}/share/* ${D}${datadir}/
 fi
 }
diff --git a/meta/classes/distutils.bbclass b/meta/classes/distutils.bbclass
index 857572d..3340d1e 100644
--- a/meta/classes/distutils.bbclass
+++ b/meta/classes/distutils.bbclass
@@ -41,7 +41,7 @@ distutils_do_install() {
 # only modify file if it contains path  and recompile it
 find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e 
s:${D}::g {} \; -exec ${STAGING_BINDIR_NATIVE}/python-native/python 
-mcompileall {} \;

-if test -e ${D}${bindir} ; then
+if [ -e ${D}${bindir} ]; then
 for i in ${D}${bindir}/* ; do \
 if [ ${PN} != "${BPN}-native" ]; then
sed -i -e 
s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
@@ -50,7 +50,7 @@ distutils_do_install() {
 done
 fi

-if test -e ${D}${sbindir}; then
+if [ -e ${D}${sbindir} ]; then
 for i in ${D}${sbindir}/* ; do \
 if [ ${PN} != "${BPN}-native" ]; then
sed -i -e 
s:${STAGING_BINDIR_NATIVE}/python-native/python:${bindir}/env\ python:g $i
@@ -65,13 +65,13 @@ distutils_do_install() {
 #
 # FIXME: Bandaid against wrong datadir computation
 #
-if test -e ${D}${datadir}/share; then
+if [ -e ${D}${datadir}/share ]; then
 mv -f ${D}${datadir}/share/* ${D}${datadir}/
 rmdir ${D}${datadir}/share
 fi

# Fix backport modules
-   if test -e 
${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/backports/__init__.py && test -e 
${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py; then
+   if [ -e 
${STAGING_LIBDIR}/${PYTHON_DIR}/site-packages/backports/__init__.py ] && [ -e 
${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py ]; then
   rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.py;
   rm ${D}${PYTHON_SITEPACKAGES_DIR}/backports/__init__.pyc;
fi
diff --git a/meta/classes/distutils3.bbclass b/meta/classes/distutils3.bbclass
index a6720c5..d306b88 100644
--- a/meta/classes/distutils3.bbclass
+++ b/meta/classes/distutils3.bbclass
@@ -45,14 +45,14 @@ distutils3_do_install() {
 # support filenames with *spaces*
 find ${D} -name "*.py" -exec grep -q ${D} {} \; -exec sed -i -e 
s:${D}::g {} \;

-if test -e ${D}${bindir} ; then
+if [ -e ${D}${bindir} ]; then
 for i in ${D}${bindir}/* ; do \
 sed -i -e 
s:${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN}:${bindir}/env\ 
${PYTHON_PN}:g $i
 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
 done
 fi

-if test -e ${D}${sbindir}; then
+if [ -e ${D}${sbindir} ]; then
 for i in ${D}${sbindir}/* ; do \
 sed -i -e 
s:${STAGING_BINDIR_NATIVE}/python-${PYTHON_PN}/${PYTHON_PN}:${bindir}/env\ 
${PYTHON_PN}:g $i
 sed -i -e s:${STAGING_BINDIR_NATIVE}:${bindir}:g $i
@@ -64,7 +64,7 @@ distutils3_do_install() {
 #
 # FIXME: Bandaid against wrong datadir computation
 #
-if test -e ${D}${datadir}/share; then
+if [ -e ${D}${datadir}/share ]; then
 mv -f ${D}${datadir}/share/* ${D}${datadir}/
 rmdir ${D}${datadir}/share
 fi
diff --git a/meta/classes/go.bbclass b/meta/classes/go.bbclass
index 42bbd73..85f71a2 100644
--- a/meta/classes/go.bbclass
+++ b/meta/classes/go.bbclass
@@ -36,7 +36,7 @@ GO_INSTALL ?= "${GO_IMPORT}/..."

 do_go_compile() {

Re: [OE-core] [PATCHv2] dnf: move the entire dnf/rpm4 stack to Python 3

2017-03-25 Thread Richard Purdie
On Fri, 2017-03-24 at 23:08 +0200, Alexander Kanavin wrote:
> [YOCTO #11180]

So close but:

https://autobuilder.yocto.io/builders/nightly-multilib/builds/226
https://autobuilder.yocto.io/builders/nightly-x32/builds/206

Cheers,

Richard
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] CPU profiling at thread level

2017-03-25 Thread Munagala Naresh
Hi Team,

To analyzes the CPU load consumption of a particular process, we need to
find the thread level consumption. Default *top *and *ps *utils are not
supporting all the parameters that are available in Linux/Android.


Could you please suggest some alternatives which works in openembedded
platform?


Appreciate any pointers.

Thanks
Naresh
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] Using MACHINE_FEATURES in a native recipe

2017-03-25 Thread Peter Kjellerstedt
> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org
> [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf Of
> Richard Purdie
> Sent: den 25 mars 2017 11:27
> To: Peter Kjellerstedt; Andre McCurdy; OE Core mailing list
> Subject: Re: [OE-core] Using MACHINE_FEATURES in a native recipe
> 
> On Fri, 2017-03-24 at 15:10 +, Peter Kjellerstedt wrote:
> > Even though I agree this is a good change and that it should be done,
> > I wonder if we can either hold it off until after Pyro has been
> > released or make it possible to avoid it? The reason for this is that
> > I know that this change will require a huge amount of development
> > work for us, something that will not be possible to do in the time
> > frame left until Pyro is released. Or alternatively we will have to
> > copy native.bbclass to our layers and maintain a fork of it, which
> > sucks...
> >
> > The reason for this is that our unit test framework is based on
> > building all our own packages as native, but still configured via,
> > amongst others, MACHINE_FEATURES as if building for the real target.
> > This will of course not work anymore if MACHINE_FEATURES is set to ""
> > with no way of overriding it.
> 
> I'm afraid I only saw this after I merged it :(

No worries. I'll backport native.bbclass to our layers for now.

> I appreciate its a pain but I do think the change is the right thing to
> do (maybe with a corresponding DISTRO_FEATURES one too). Hopefully we
> can find a way that lets you work around it somehow...

I agree that cleaning MACHINE_FEATURES is the right thing to do. However, 
I am not so sure about DISTRO_FEATURES. After all, the native tools are 
part of the distro as well and there may be reasons to build them 
differently based on enabled features in the distro.

> Cheers,
> 
> Richard

//Peter

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] Using MACHINE_FEATURES in a native recipe

2017-03-25 Thread Richard Purdie
On Fri, 2017-03-24 at 15:10 +, Peter Kjellerstedt wrote:
> Even though I agree this is a good change and that it should be done,
> I wonder if we can either hold it off until after Pyro has been
> released or make it possible to avoid it? The reason for this is that
> I know that this change will require a huge amount of development
> work for us, something that will not be possible to do in the time
> frame left until Pyro is released. Or alternatively we will have to
> copy native.bbclass to our layers and maintain a fork of it, which
> sucks...
> 
> The reason for this is that our unit test framework is based on
> building all our own packages as native, but still configured via,
> amongst others, MACHINE_FEATURES as if building for the real target.
> This will of course not work anymore if MACHINE_FEATURES is set to ""
> with no way of overriding it.

I'm afraid I only saw this after I merged it :(

I appreciate its a pain but I do think the change is the right thing to
do (maybe with a corresponding DISTRO_FEATURES one too). Hopefully we
can find a way that lets you work around it somehow...

Cheers,

Richard
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] State of bitbake world, Failed tasks 2017-03-22

2017-03-25 Thread Martin Jansa
== Number of issues - stats ==
{| class='wikitable'
!|Date   !!colspan='3'|Failed tasks 
!!colspan='6'|Failed depencencies!!|Signatures
!!colspan='12'|QA !!Comment
|-
||  ||qemuarm   ||qemux86   ||qemux86_64
||qemuarm||max||min ||qemux86||max||min ||all   ||already-stripped  
||libdir||textrel   ||build-deps||file-rdeps
||version-going-backwards   ||host-user-contaminated
||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot
||invalid-pkgconfig ||pkgname   ||  
|-
||2017-03-22||15||21||20||N/A   ||N/A   ||N/A   ||N/A   ||N/A   
||N/A   ||0 ||0 ||0 ||1 ||0 
||0 ||0 ||1 ||0 ||0 
||0 ||0 ||0 ||  
|}

http://www.openembedded.org/wiki/Bitbake_World_Status

== Failed tasks 2017-03-22 ==

INFO: jenkins-job.sh-1.8.19 Complete log available at 
http://logs.nslu2-linux.org/buildlogs/oe/world/pyro/log.report.20170324_220429.log

=== common (15) ===
* 
meta-openembedded/meta-multimedia/recipes-multimedia/alsa-equal/alsa-equal_0.6.bb:do_fetch
* 
meta-openembedded/meta-oe/recipes-extended/lcdproc/lcdproc_0.5.7.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-extended/libexecinfo/libexecinfo_1.1.bb:do_compile
* meta-openembedded/meta-oe/recipes-extended/libqb/libqb_0.17.2.bb:do_fetch
* meta-openembedded/meta-oe/recipes-extended/tcsh/tcsh_6.18.01.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-abyssinica_1.500.bb:do_fetch
* 
meta-openembedded/meta-oe/recipes-graphics/ttf-fonts/ttf-liberation-sans-narrow_1.07.4.bb:do_fetch
* meta-openembedded/meta-oe/recipes-support/atop/atop_git.bb:do_fetch
* meta-openembedded/meta-oe/recipes-support/gpm/gpm_git.bb:do_install
* meta-openembedded/meta-oe/recipes-support/hwdata/hwdata_0.291.bb:do_fetch
* 
meta-openembedded/meta-oe/recipes-support/mailcap/mailcap_2.1.46.bb:do_fetch
* meta-openembedded/meta-oe/recipes-support/zile/zile_2.4.11.bb:do_install
* 
meta-openembedded/meta-python/recipes-devtools/python/python-slip-dbus_0.6.1.bb:do_fetch
* openembedded-core/meta/recipes-graphics/mesa/mesa_17.0.1.bb:do_configure
* 
virtual:native:meta-openembedded/meta-efl/recipes-efl/efl/efl_1.15.1.bb:do_compile

=== common-x86 (2) ===
* 
meta-openembedded/meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_5.1.14.bb:do_install
* openembedded-core/meta/recipes-core/ovmf/ovmf_git.bb:do_compile

=== qemuarm (0) ===

=== qemux86 (2) ===
* meta-openembedded/meta-oe/recipes-support/dstat/dstat_0.7.3.bb:do_compile
* 
virtual:native:meta-openembedded/meta-oe/recipes-support/uim/uim_1.8.6.bb:do_install

=== qemux86_64 (1) ===
* meta-smartphone/meta-shr/recipes-shr/shr/libshr-glib_git.bb:do_compile

=== Number of failed tasks (56) ===
{| class=wikitable
|-
|| qemuarm  || 15|| 
http://logs.nslu2-linux.org/buildlogs/oe/world/pyro/log.world.qemuarm.20170322_025058.log/
 || http://errors.yoctoproject.org/Errors/Build/34831/
|-
|| qemux86  || 21|| 
http://logs.nslu2-linux.org/buildlogs/oe/world/pyro/log.world.qemux86.20170322_041911.log/
 || http://errors.yoctoproject.org/Errors/Build/34767/
http://errors.yoctoproject.org/Errors/Build/34768/
http://errors.yoctoproject.org/Errors/Build/34832/
|-
|| qemux86_64   || 20|| 
http://logs.nslu2-linux.org/buildlogs/oe/world/pyro/log.world.qemux86-64.20170322_221011.log/
 || http://errors.yoctoproject.org/Errors/Build/34833/
http://errors.yoctoproject.org/Errors/Build/34834/
http://errors.yoctoproject.org/Errors/Build/34851/
|}

=== PNBLACKLISTs (350) ===

=== QA issues (2) ===
{| class=wikitable
!| Count||Issue
|-
||0 ||already-stripped
|-
||0 ||build-deps
|-
||0 ||file-rdeps
|-
||0 ||installed-vs-shipped
|-
||0 ||invalid-pkgconfig
|-
||0 ||libdir
|-
||0 ||pkgname
|-
||0 ||symlink-to-sysroot
|-
||0 ||unknown-configure-option
|-
||0 ||version-going-backwards
|-
||1 ||host-user-contaminated
|-
||1 ||textrel
|}



=== Incorrect PACKAGE_ARCH or sstate signatures (0) ===

Complete log: 
http://logs.nslu2-linux.org/buildlogs/oe/world/pyro/log.signatures.20170322_204049.log/

No issues detected




signature.asc
Description: Digital signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core