[yocto] linux-firmware: build failure

2017-10-31 Thread Craig McQueen
I'm trying upgrading to rocko (from morty).

I'm getting a build failure for linux-firmware:


DEBUG: Executing python function extend_recipe_sysroot
NOTE: Direct dependencies are 
['virtual:native:/home/craigm/yocto/poky/build/../meta/recipes-devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot',
 
'/home/craigm/yocto/poky/build/../meta/recipes-devtools/quilt/quilt-native_0.65.bb:do_populate_sysroot']
NOTE: Installed into sysroot: ['pseudo-native']
NOTE: Skipping as already exists in sysroot: ['quilt-native']
DEBUG: Python function extend_recipe_sysroot finished
DEBUG: Executing shell function do_install
rm: cannot remove 
'/home/craigm/yocto/poky/build/tmp/work/all-poky-linux/linux-firmware/1_0.0+gitAUTOINC+80d463be82-r0/image/lib/firmware/check_whence.py':
 No such file or directory
WARNING: exit code 1 from a shell command.
ERROR: Function failed: do_install (log file is located at 
/home/craigm/yocto/poky/build/tmp/work/all-poky-linux/linux-firmware/1_0.0+gitAUTOINC+80d463be82-r0/temp/log.do_install.120558)


It seems that the latest git doesn't contain check_whence.py... or something 
like that. But I'm puzzled as to why the previous committer 
(17a772775c2559897e49236ae352444065e1b1ff perhaps) would not have encountered 
this.

Would the following be a suitable fix? --


diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb 
b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index 0338ba8ac2..b8f2865e3b 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -215,7 +215,7 @@ do_install() {
rm ${D}${nonarch_base_libdir}/firmware/configure
 
# Remove python script used to check the WHENCE file
-   rm ${D}${nonarch_base_libdir}/firmware/check_whence.py
+   rm ${D}${nonarch_base_libdir}/firmware/check_whence.py -rf
 
# Libertas sd8686
ln -sf libertas/sd8686_v9.bin 
${D}${nonarch_base_libdir}/firmware/sd8686.bin


-- 
Craig McQueen

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [meta-selinux][PATCH] python-ipy: Update SRC_URI

2017-10-31 Thread Ergun, Dogukan
From: Dogukan Ergun 

python.org does not serve files with http anymore

Signed-off-by: Dogukan Ergun 
---
 recipes-devtools/python/python-ipy_0.83.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recipes-devtools/python/python-ipy_0.83.bb 
b/recipes-devtools/python/python-ipy_0.83.bb
index b2a9739..df060fa 100644
--- a/recipes-devtools/python/python-ipy_0.83.bb
+++ b/recipes-devtools/python/python-ipy_0.83.bb
@@ -9,7 +9,7 @@ DEPENDS = "python"
 LICENSE = "BSD"
 LIC_FILES_CHKSUM = "file://COPYING;md5=ebc0028ff5cdaf7796604875027dcd55"
 
-SRC_URI = "http://pypi.python.org/packages/source/I/IPy/IPy-${PV}.tar.gz";
+SRC_URI = "https://pypi.python.org/packages/source/I/IPy/IPy-${PV}.tar.gz";
 
 SRC_URI[md5sum] = "7b8c6eb4111b15aea31b67108e769712"
 SRC_URI[sha256sum] = 
"61da5a532b159b387176f6eabf11946e7458b6df8fb8b91ff1d345ca7a6edab8"
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Adding ImageTest support to meta-mono

2017-10-31 Thread Alex Lennon

Hi,

I've been adding in some simple image tests to meta-mono and things seem 
to be working.


A couple of minor questions came up in the process which I can't spot 
obvious answers to. Perhaps you could help?


(1) The image tests wiki 
(https://wiki.yoctoproject.org/wiki/Image_tests) references use of 
filesdir for resources.


e.g.

oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.c"), 
"/tmp/test.c")

That helper class resolves filesdir to poky/meta ...

I need my resource files to be in the meta-mono layer.

In the end just copied out the code to my layer with

|files_dir = 
os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), 
"../files"))|


However I'm wondering if there's a less hand-rolled way to get a layer 
specific resources folder?


(2) The OETestID(x) decorator seems to be displayed during the test 
execution.


Where is this number derived? Is it layer specific or it if I pluck a 
number of of the air do I risk conflicting with other OE test IDs?


Thanks,

Alex


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] linux-firmware: build failure

2017-10-31 Thread Fabien Lahoudere
On Tue, 2017-10-31 at 18:04 +1100, Craig McQueen wrote:
> I'm trying upgrading to rocko (from morty).
> 
> I'm getting a build failure for linux-firmware:
> 
> 
> DEBUG: Executing python function extend_recipe_sysroot
> NOTE: Direct dependencies are 
> ['virtual:native:/home/craigm/yocto/poky/build/../meta/recipes-
> devtools/pseudo/pseudo_1.8.2.bb:do_populate_sysroot',
> '/home/craigm/yocto/poky/build/../meta/recipes-devtools/quilt/quilt-
> native_0.65.bb:do_populate_sysroot']
> NOTE: Installed into sysroot: ['pseudo-native']
> NOTE: Skipping as already exists in sysroot: ['quilt-native']
> DEBUG: Python function extend_recipe_sysroot finished
> DEBUG: Executing shell function do_install
> rm: cannot remove 
> '/home/craigm/yocto/poky/build/tmp/work/all-poky-linux/linux-
> firmware/1_0.0+gitAUTOINC+80d463be82-r0/image/lib/firmware/check_whence.py': 
> No such file or
> directory
> WARNING: exit code 1 from a shell command.
> ERROR: Function failed: do_install (log file is located at
> /home/craigm/yocto/poky/build/tmp/work/all-poky-linux/linux-firmware/1_0.0+gitAUTOINC+80d463be82-
> r0/temp/log.do_install.120558)
> 
> 
> It seems that the latest git doesn't contain check_whence.py... or something 
> like that. But I'm
> puzzled as to why the previous committer 
> (17a772775c2559897e49236ae352444065e1b1ff perhaps) would
> not have encountered this.
> 
> Would the following be a suitable fix? --

If the file doesn't exist in the source repository you can just remove the line.

> 
> 
> diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb 
> b/meta/recipes-kernel/linux-
> firmware/linux-firmware_git.bb
> index 0338ba8ac2..b8f2865e3b 100644
> --- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
> +++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
> @@ -215,7 +215,7 @@ do_install() {
> rm ${D}${nonarch_base_libdir}/firmware/configure
>  
> # Remove python script used to check the WHENCE file
> -   rm ${D}${nonarch_base_libdir}/firmware/check_whence.py
> +   rm ${D}${nonarch_base_libdir}/firmware/check_whence.py -rf
>  
> # Libertas sd8686
> ln -sf libertas/sd8686_v9.bin 
> ${D}${nonarch_base_libdir}/firmware/sd8686.bin
> 
> 
> -- 
> Craig McQueen
> 
-- 
Fabien
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] linux-firmware: build failure

2017-10-31 Thread Alexander Kanavin

On 10/31/2017 09:04 AM, Craig McQueen wrote:

Would the following be a suitable fix? --


This needs to go to oe-core list. Just one comment...


 # Remove python script used to check the WHENCE file
-   rm ${D}${nonarch_base_libdir}/firmware/check_whence.py
+   rm ${D}${nonarch_base_libdir}/firmware/check_whence.py -rf
  


You need to either remove the file, or remove the line that does the 
removal. Don't do a 'remove if present', it's better to be deterministic.


Alex
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Bitwise Operations in BBClass

2017-10-31 Thread Ayoub Zaki

Hello,

I'm trying to get a bitwise operation working in a bitbake bblcass 
function but no luck so far :


my_function() {

    SZ="`wc -c < ${1}`"

    ALIGN_SZ=$(((${SZ} + 0x1000 - 1) & ~ (0x1000 - 1)))

    ...

}

Bitbake complains with :

ERROR: ExpansionError during parsing 
/opt/Projects/Yocto/meta-somelayer/recipes-kernel/linux/linux-imx_4.1.15.bb: 
Failure expanding variable my_function: NotImplementedError: $((



Any suggestions how to tackle this problem ?

Thank you !

--
Ayoub Zaki
Embedded Systems Consultant

Vaihinger Straße 2/1
D-71634 Ludwigsburg

Tel. : +4971415074546
Mobile   : +4917662901545
Email: ayoub.z...@embexus.com
Homepage : https://embexus.com
VAT No.  : DE313902634

--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Bitwise Operations in BBClass

2017-10-31 Thread Burton, Ross
That would be https://bugzilla.yoctoproject.org/show_bug.cgi?id=11314, $((
isn't supported by our shell parser. Shouldn't be that difficult to fix in
bitbake.

Ross

On 31 October 2017 at 11:27, Ayoub Zaki  wrote:

> Hello,
>
> I'm trying to get a bitwise operation working in a bitbake bblcass
> function but no luck so far :
>
> my_function() {
>
> SZ="`wc -c < ${1}`"
>
> ALIGN_SZ=$(((${SZ} + 0x1000 - 1) & ~ (0x1000 - 1)))
>
> ...
>
> }
>
> Bitbake complains with :
>
> ERROR: ExpansionError during parsing /opt/Projects/Yocto/meta-somel
> ayer/recipes-kernel/linux/linux-imx_4.1.15.bb: Failure expanding variable
> my_function: NotImplementedError: $((
>
>
> Any suggestions how to tackle this problem ?
>
> Thank you !
>
> --
> Ayoub Zaki
> Embedded Systems Consultant
>
> Vaihinger Straße 2/1
> 
> D-71634 Ludwigsburg
>
> Tel. : +4971415074546
> Mobile   : +4917662901545
> Email: ayoub.z...@embexus.com
> Homepage : https://embexus.com
> VAT No.  : DE313902634
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Bitwise Operations in BBClass

2017-10-31 Thread Ayoub Zaki

Hi,


On 31.10.2017 12:34, Burton, Ross wrote:
That would be https://bugzilla.yoctoproject.org/show_bug.cgi?id=11314, 
$(( isn't supported by our shell parser. Shouldn't be that difficult 
to fix in bitbake.


Any workarrounds for that problem ?
I tried with expr but it does not recognize bitwise operations like  & ~
I'm really stucked ...



Ross

On 31 October 2017 at 11:27, Ayoub Zaki > wrote:


Hello,

I'm trying to get a bitwise operation working in a bitbake bblcass
function but no luck so far :

my_function() {

    SZ="`wc -c < ${1}`"

    ALIGN_SZ=$(((${SZ} + 0x1000 - 1) & ~ (0x1000 - 1)))

    ...

}

Bitbake complains with :

ERROR: ExpansionError during parsing
/opt/Projects/Yocto/meta-somelayer/recipes-kernel/linux/linux-imx_4.1.15.bb
: Failure expanding variable
my_function: NotImplementedError: $((


Any suggestions how to tackle this problem ?

Thank you !

-- 
Ayoub Zaki

Embedded Systems Consultant

Vaihinger Straße 2/1

D-71634 Ludwigsburg

Tel.     : +4971415074546 
Mobile   : +4917662901545 
Email    : ayoub.z...@embexus.com 
Homepage : https://embexus.com
VAT No.  : DE313902634

-- 
___

yocto mailing list
yocto@yoctoproject.org 
https://lists.yoctoproject.org/listinfo/yocto





--
Ayoub Zaki
Embedded Systems Consultant

Vaihinger Straße 2/1
D-71634 Ludwigsburg

Tel. : +4971415074546
Mobile   : +4917662901545
Email: ayoub.z...@embexus.com
Homepage : https://embexus.com
VAT No.  : DE313902634

--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Bitwise Operations in BBClass

2017-10-31 Thread Burton, Ross
Two options:

1) fix the bug
2) write the logic in a Python function

On 31 October 2017 at 11:38, Ayoub Zaki  wrote:

> Hi,
>
>
> On 31.10.2017 12:34, Burton, Ross wrote:
>
>> That would be https://bugzilla.yoctoproject.org/show_bug.cgi?id=11314,
>> $(( isn't supported by our shell parser. Shouldn't be that difficult to fix
>> in bitbake.
>>
>
> Any workarrounds for that problem ?
> I tried with expr but it does not recognize bitwise operations like  & ~
> I'm really stucked ...
>
>
>> Ross
>>
>> On 31 October 2017 at 11:27, Ayoub Zaki > ayoub.z...@embexus.com>> wrote:
>>
>> Hello,
>>
>> I'm trying to get a bitwise operation working in a bitbake bblcass
>> function but no luck so far :
>>
>> my_function() {
>>
>> SZ="`wc -c < ${1}`"
>>
>> ALIGN_SZ=$(((${SZ} + 0x1000 - 1) & ~ (0x1000 - 1)))
>>
>> ...
>>
>> }
>>
>> Bitbake complains with :
>>
>> ERROR: ExpansionError during parsing
>> /opt/Projects/Yocto/meta-somelayer/recipes-kernel/linux/linu
>> x-imx_4.1.15.bb
>> : Failure expanding variable
>> my_function: NotImplementedError: $((
>>
>>
>> Any suggestions how to tackle this prob
>> lem
>> ?
>>
>> Thank you !
>>
>> -- Ayoub Zaki
>> Embedded Systems Consultant
>>
>> Vaihinger Straße 2/1
>> > gmail&source=g>
>> D-71634 Ludwigsburg
>>
>> Tel. : +4971415074546 
>> Mobile   : +4917662901545 
>> Email: ayoub.z...@embexus.com 
>> Homepage : https://embexus.com
>> VAT No.  : DE313902634
>>
>> -- ___
>> yocto mailing list
>> yocto@yoctoproject.org 
>> https://lists.yoctoproject.org/listinfo/yocto
>> 
>>
>>
>>
> --
> Ayoub Zaki
> Embedded Systems Consultant
>
> Vaihinger Straße 2/1
> D-71634 Ludwigsburg
>
> Tel. : +4971415074546
> Mobile   : +4917662901545
> Email: ayoub.z...@embexus.com
> Homepage : https://embexus.com
> VAT No.  : DE313902634
>
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Using site.conf

2017-10-31 Thread Michael Habibi
Is there an example of this somewhere? I haven't had any luck in
documentation or example code to see how to make the site.conf be used.

On Mon, Oct 30, 2017 at 6:16 PM, Khem Raj  wrote:

> On Fri, Oct 27, 2017 at 11:59 AM, Michael Habibi 
> wrote:
> > I'm a bit confused about the usage of site.conf. I see a sample in the
> poky
> > distro area, but I'm not sure how this actually gets copied into a
> site.conf
> > and actually used by deployed versions of our distribution.
> >
> > Is there some extra step I need to take to ensure site.conf.sample from
> my
> > own distributions conf directory gets copied and actually used by our
> > engineers' environments?
>
> yes, you need to do that as part of workspace setup.
>
> >
> > --
> > ___
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Using site.conf

2017-10-31 Thread Tim Orling
http://www.yoctoproject.org/docs/2.4/mega-manual/mega-manual.html#user-configuration
On Tue, Oct 31, 2017 at 7:15 AM Michael Habibi  wrote:

> Is there an example of this somewhere? I haven't had any luck in
> documentation or example code to see how to make the site.conf be used.
>
> On Mon, Oct 30, 2017 at 6:16 PM, Khem Raj  wrote:
>
>> On Fri, Oct 27, 2017 at 11:59 AM, Michael Habibi 
>> wrote:
>> > I'm a bit confused about the usage of site.conf. I see a sample in the
>> poky
>> > distro area, but I'm not sure how this actually gets copied into a
>> site.conf
>> > and actually used by deployed versions of our distribution.
>> >
>> > Is there some extra step I need to take to ensure site.conf.sample from
>> my
>> > own distributions conf directory gets copied and actually used by our
>> > engineers' environments?
>>
>> yes, you need to do that as part of workspace setup.
>>
>> >
>> > --
>> > ___
>> > yocto mailing list
>> > yocto@yoctoproject.org
>> > https://lists.yoctoproject.org/listinfo/yocto
>> >
>>
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Using site.conf

2017-10-31 Thread Burton, Ross
On 31 October 2017 at 14:15, Michael Habibi  wrote:

> Is there an example of this somewhere? I haven't had any luck in
> documentation or example code to see how to make the site.conf be used.
>
>
site.conf is loaded if it is present in a conf/ directory anywhere.  I have
a meta-ross which contains conf/site.conf, I add that layer to every build
tree and bitbake will read the site.conf.  There's not a lot more to it
really.

Ross
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Can't run "-c devshell" - "Must be connected to a terminal"

2017-10-31 Thread Adam Lee
Not sure what has changed. I attached another terminal to the existing
container and it works fine.. Don't know what went wrong with the original
one. Weird.
Thanks for paying attention to my thread Khem.

Adam

On Mon, Oct 30, 2017 at 7:29 PM Khem Raj  wrote:

> On Mon, Oct 30, 2017 at 1:49 PM, Adam Lee  wrote:
> > Hello everyone, I have this strange issue where I can't run "-c devshell"
> > any longer.
> >
> > This worked until a day ago.
> > I am on Morty, and running in a Docker container.
> >
>
> what changed ?
>
> > Has anyone seen this:
> >
> > Currently  1 running tasks (100 of 100)  99%
> >
> |#
> > |
> > 0: cmem-4.14.00.00+gitAUTOINC+b514a99ac4-r1 do_devshell - 0s (pid 20279)
> > Trying to run: screen -r devshell_20279
> > Must be connected to a terminal.
> > Trying to run: screen -r devshell_20279
> > Must be connected to a terminal.
> > Trying to run: screen -r devshell_20279
> > Must be connected to a terminal.
> > Trying to run: screen -r devshell_20279
> > Must be connected to a terminal.
> > Trying to run: screen -r devshell_20279
> > Must be connected to a terminal.
> > Trying to run: screen -r devshell_20279
> > Must be connected to a terminal.
> > Trying to run: screen -r devshell_20279
> > Must be connected to a terminal.
> > Trying to run: screen -r devshell_20279
> > Must be connected to a terminal.
> > Trying to run: screen -r devshell_20279
> > Must be connected to a terminal.
> > WARNING: Screen started. Please connect in another terminal with "screen
> -r
> > devshell_20279"
> >
> > Thank you,
> >
> > Adam
> >
> >
> > --
> > ___
> > yocto mailing list
> > yocto@yoctoproject.org
> > https://lists.yoctoproject.org/listinfo/yocto
> >
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Using site.conf

2017-10-31 Thread Michael Habibi
Ok thanks! I think I mistakenly thought that I needed to have it be called
site.conf.sample, and it will copy the sample into the .conf file in the
build/conf area.

On Tue, Oct 31, 2017 at 9:24 AM, Burton, Ross  wrote:

> On 31 October 2017 at 14:15, Michael Habibi  wrote:
>
>> Is there an example of this somewhere? I haven't had any luck in
>> documentation or example code to see how to make the site.conf be used.
>>
>>
> site.conf is loaded if it is present in a conf/ directory anywhere.  I
> have a meta-ross which contains conf/site.conf, I add that layer to every
> build tree and bitbake will read the site.conf.  There's not a lot more to
> it really.
>
> Ross
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [layerindex-web][patch v1 0/1]

2017-10-31 Thread Amanda Brindle
The following changes since commit 44386eea41a8e1bb8a3ab831613cfc1a19ff6ecd:

  querysethelper: fix searching (2017-10-31 09:58:30 +1300)

are available in the git repository at:

  git://git.yoctoproject.org/layerindex-web abrindle/bbclass_search
  
http://git.yoctoproject.org/cgit.cgi/layerindex-web/log/?h=abrindle/bbclass_search

Amanda Brindle (1):
  templates/layerindex/classes.html: Add bbclass search

 layerindex/restviews.py| 10 -
 layerindex/urls.py |  3 ++
 layerindex/urls_branch.py  |  6 ++-
 layerindex/views.py| 24 
 templates/layerindex/classes.html  | 75 ++
 templates/layerindex/distros.html  |  1 +
 templates/layerindex/layers.html   |  1 +
 templates/layerindex/machines.html |  1 +
 templates/layerindex/recipes.html  |  1 +
 9 files changed, 120 insertions(+), 2 deletions(-)
 create mode 100644 templates/layerindex/classes.html

-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [layerindex-web][patch v1 1/1] templates/layerindex/classes.html: Add bbclass search

2017-10-31 Thread Amanda Brindle
Add another tab to search for classes.

Fixes [YOCTO #11207]

Signed-off by: Amanda Brindle 
---
 layerindex/restviews.py| 10 -
 layerindex/urls.py |  3 ++
 layerindex/urls_branch.py  |  6 ++-
 layerindex/views.py| 24 
 templates/layerindex/classes.html  | 75 ++
 templates/layerindex/distros.html  |  1 +
 templates/layerindex/layers.html   |  1 +
 templates/layerindex/machines.html |  1 +
 templates/layerindex/recipes.html  |  1 +
 9 files changed, 120 insertions(+), 2 deletions(-)
 create mode 100644 templates/layerindex/classes.html

diff --git a/layerindex/restviews.py b/layerindex/restviews.py
index d947bbf..836aa54 100644
--- a/layerindex/restviews.py
+++ b/layerindex/restviews.py
@@ -1,4 +1,4 @@
-from layerindex.models import Branch, LayerItem, LayerNote, LayerBranch, 
LayerDependency, Recipe, Machine, Distro
+from layerindex.models import Branch, LayerItem, LayerNote, LayerBranch, 
LayerDependency, Recipe, Machine, Distro, BBClass
 from rest_framework import viewsets, serializers
 from layerindex.querysethelper import params_to_queryset, get_search_tuple
 
@@ -64,3 +64,11 @@ class DistroSerializer(serializers.ModelSerializer):
 class DistroViewSet(ParametricSearchableModelViewSet):
 queryset = Distro.objects.all()
 serializer_class = DistroSerializer
+
+class ClassSerializer(serializers.ModelSerializer):
+class Meta:
+model = BBClass
+
+class ClassViewSet(ParametricSearchableModelViewSet):
+queryset = BBClass.objects.all()
+serializer_class = ClassSerializer
diff --git a/layerindex/urls.py b/layerindex/urls.py
index b4535d2..6a1cb6a 100644
--- a/layerindex/urls.py
+++ b/layerindex/urls.py
@@ -22,6 +22,7 @@ router.register(r'layerDependencies', 
restviews.LayerDependencyViewSet)
 router.register(r'recipes', restviews.RecipeViewSet)
 router.register(r'machines', restviews.MachineViewSet)
 router.register(r'distros', restviews.DistroViewSet)
+router.register(r'classes', restviews.ClassViewSet)
 
 urlpatterns = patterns('',
 url(r'^$',
@@ -40,6 +41,8 @@ urlpatterns = patterns('',
 RedirectView.as_view(url=reverse_lazy('machine_search', 
args=('master',)), permanent=False)),
 url(r'^distros/$',
 RedirectView.as_view(url=reverse_lazy('distro_search', 
args=('master',)), permanent=False)),
+url(r'^classes/$',
+RedirectView.as_view(url=reverse_lazy('class_search', 
args=('master',)), permanent=False)),
  
 url(r'^submit/$', edit_layer_view, {'template_name': 
'layerindex/submitlayer.html'}, name="submit_layer"),
 url(r'^submit/thanks$',
diff --git a/layerindex/urls_branch.py b/layerindex/urls_branch.py
index 89659d9..d451896 100644
--- a/layerindex/urls_branch.py
+++ b/layerindex/urls_branch.py
@@ -7,7 +7,7 @@
 from django.conf.urls import *
 from django.views.defaults import page_not_found
 from django.core.urlresolvers import reverse_lazy
-from layerindex.views import LayerListView, RecipeSearchView, 
MachineSearchView, DistroSearchView, PlainTextListView, LayerDetailView, 
edit_layer_view, delete_layer_view, edit_layernote_view, delete_layernote_view, 
RedirectParamsView, DuplicatesView, LayerUpdateDetailView
+from layerindex.views import LayerListView, RecipeSearchView, 
MachineSearchView, DistroSearchView, ClassSearchView, PlainTextListView, 
LayerDetailView, edit_layer_view, delete_layer_view, edit_layernote_view, 
delete_layernote_view, RedirectParamsView, DuplicatesView, LayerUpdateDetailView
 
 urlpatterns = patterns('',
 url(r'^$', 
@@ -32,6 +32,10 @@ urlpatterns = patterns('',
 DistroSearchView.as_view(
 template_name='layerindex/distros.html'),
 name='distro_search'),
+url(r'^classes/$',
+ClassSearchView.as_view(
+template_name='layerindex/classes.html'),
+name='class_search'),
 url(r'^edit/(?P[-\w]+)/$', edit_layer_view, {'template_name': 
'layerindex/editlayer.html'}, name="edit_layer"),
 url(r'^duplicates/$',
 DuplicatesView.as_view(
diff --git a/layerindex/views.py b/layerindex/views.py
index 3b22067..03d47f2 100644
--- a/layerindex/views.py
+++ b/layerindex/views.py
@@ -724,6 +724,30 @@ class DistroSearchView(ListView):
 context['this_url_name'] = resolve(self.request.path_info).url_name
 return context
 
+class ClassSearchView(ListView):
+context_object_name = 'class_list'
+paginate_by = 50
+
+def get_queryset(self):
+_check_url_branch(self.kwargs)
+query_string = self.request.GET.get('q', '')
+init_qs = 
BBClass.objects.filter(layerbranch__branch__name=self.kwargs['branch'])
+if query_string.strip():
+entry_query = simplesearch.get_query(query_string, ['name'])
+return init_qs.filter(entry_query).order_by('name', 
'layerbranch__layer')
+
+if 'q' in self.request.GET:
+return init_qs.order_by('name', 'layerbranch__layer')
+
+

Re: [yocto] Using site.conf

2017-10-31 Thread Khem Raj
On Tue, Oct 31, 2017 at 7:25 AM Burton, Ross  wrote:

> On 31 October 2017 at 14:15, Michael Habibi  wrote:
>
>> Is there an example of this somewhere? I haven't had any luck in
>> documentation or example code to see how to make the site.conf be used.
>>
>>
> site.conf is loaded if it is present in a conf/ directory anywhere.  I
> have a meta-ross which contains conf/site.conf, I add that layer to every
> build tree and bitbake will read the site.conf.  There's not a lot more to
> it really.
>

You don’t want to add a site.conf file in any Layer especially if you are
tweaking a global distri config it would be a bad practice

>
> Ross
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [Yocto] Checking sstate mirror is hanging at 100%

2017-10-31 Thread Andre McCurdy
>>
>> It looks like the logic in the wget fetcher retries once, so if it's getting 
>> stuck
>> then that seems like a genuine bug.
>>
>> Vineeth, are you sure it's really continuously retrying?
> Yes, I see continuous retry of wget of same sstate files.

The fetcher explicitly tries to avoid that by retrying each file only
once. See retry logic in:

  
http://git.openembedded.org/bitbake/commit/?id=54b1961551511948e0cbd2ac39f19b39b9cee568

However, there is a later commit which may also be related:

  
http://git.openembedded.org/bitbake/commit/?id=6fa07752bbd3ac345cd8617da49a70e0b2dd565f

Does the version of bitbake which you are using contain both commits?
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [ptest-runner] utils.c: Prefer monotonic clock to calculate elapsed time

2017-10-31 Thread Jeffrey Pautler
The current implementation uses the system clock to calculate how long
a ptest has been running with no output. If a ptest changes the system
clock as part of the test, that can cause the current implementation
to falsely trigger a timeout or miss an actual timeout. It is
preferrable to use a monotonic clock for calculating elapsed time in
order to avoid these issues.

This change tries to use the monotonic clock first and falls back to
the realtime clock if the monotonic clock is not supported.

Signed-off-by: Jeffrey Pautler 
---
 utils.c | 24 +---
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/utils.c b/utils.c
index 6d65388..933eced 100644
--- a/utils.c
+++ b/utils.c
@@ -257,7 +257,8 @@ wait_child(const char *ptest_dir, const char *run_ptest, 
pid_t pid,
int timeout, int *fds, FILE **fps)
 {
struct pollfd pfds[2];
-   time_t sentinel;
+   struct timespec sentinel;
+   clockid_t clock = CLOCK_MONOTONIC;
int r;
 
int timeouted = 0;
@@ -269,7 +270,11 @@ wait_child(const char *ptest_dir, const char *run_ptest, 
pid_t pid,
pfds[1].fd = fds[1];
pfds[1].events = POLLIN;
 
-   sentinel = time(NULL);
+   if (clock_gettime(clock, &sentinel) == -1) {
+   clock = CLOCK_REALTIME;
+   clock_gettime(clock, &sentinel);
+   }
+
while (1) {
waitflags = WNOHANG;
 
@@ -288,11 +293,16 @@ wait_child(const char *ptest_dir, const char *run_ptest, 
pid_t pid,
fwrite(buf, n, 1, fps[1]);
}
 
-   sentinel = time(NULL);
-   } else if (timeout >= 0 && ((time(NULL) - sentinel) > timeout)) 
{
-   timeouted = 1;
-   kill(pid, SIGKILL);
-   waitflags = 0;
+   clock_gettime(clock, &sentinel);
+   } else if (timeout >= 0) {
+   struct timespec time;
+
+   clock_gettime(clock, &time);
+   if ((time.tv_sec - sentinel.tv_sec) > timeout) {
+   timeouted = 1;
+   kill(pid, SIGKILL);
+   waitflags = 0;
+   }
}
 
if (waitpid(pid, &status, waitflags) == pid)
-- 
2.7.4

-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] about add python3 modules

2017-10-31 Thread Lai Y.C.
Hi Ross,

Thanks! It works well after I added python3-misc.

//Ying

2017-10-31 0:02 GMT+01:00 Burton, Ross :

> Hi,
>
> 1.7.1 is pretty old, there were some packaging problems.  Try adding
> python3-misc to the image too.
>
> If that doesn't work, use 'oe-pkgdata-util list-pkg-files -r python3' to
> list all the files built by the python3 recipe and to find out what files
> are missing.
>
> Ross
>
> On 30 October 2017 at 20:36, Lai Y.C.  wrote:
>
>> Hi,
>>
>> I need to include python3 and some modules on my board. We are using
>> yocto 1.7.1 .
>> I have included python3 and python3-modules into the image.
>> Python3 is able to run but there are problems with the modules.
>>
>> 1. when I import "subprocess" module,  it gives errors that the module
>> "_posixsubprocess" is not found. How should I include _posixsubprocess ?
>> 2. There are couple of modules that are installed but they are found when
>> I used it. i.e. I have the argparse.py in /usr/lib/python3.3. However, the
>> module is not found when I try to import it. (tested with python3 -c
>> "import argparse"). Any clue what hasn't be set-up properly?
>>
>> Thanks
>>
>> //Ying
>>
>>
>> --
>> ___
>> yocto mailing list
>> yocto@yoctoproject.org
>> https://lists.yoctoproject.org/listinfo/yocto
>>
>>
>
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] ptest - single package

2017-10-31 Thread Dave Cobbley

Hey,

I am trying to add a single ptest to my image without adding all ptests 
from all other packages in my distro.


https://wiki.yoctoproject.org/wiki/Ptest only has instructions to add 
ptest-pkgs, but this is too large for my embedded platform.


How can I install ptest-runner plus the single ptest from a specific recipe?


Thanks,

-Dave

--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] ptest - single package

2017-10-31 Thread Burton, Ross
On 31 October 2017 at 21:51, Dave Cobbley 
wrote:

> Hey,
>
> I am trying to add a single ptest to my image without adding all ptests
> from all other packages in my distro.
>
> https://wiki.yoctoproject.org/wiki/Ptest only has instructions to add
> ptest-pkgs, but this is too large for my embedded platform.
>
> How can I install ptest-runner plus the single ptest from a specific
> recipe?
>

The ptest packages are normal packages, so just add [package]-ptest to the
image.  The ptest packages recommend ptest-runner automatically, so you
don't need to pull that in.

Ross
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] ptest - single package

2017-10-31 Thread Dave Cobbley

Ross,

That works great.

Thanks,

-Dave


On 10/31/2017 03:43 PM, Burton, Ross wrote:
On 31 October 2017 at 21:51, Dave Cobbley 
> wrote:


Hey,

I am trying to add a single ptest to my image without adding all
ptests from all other packages in my distro.

https://wiki.yoctoproject.org/wiki/Ptest
 only has instructions
to add ptest-pkgs, but this is too large for my embedded platform.

How can I install ptest-runner plus the single ptest from a
specific recipe?


The ptest packages are normal packages, so just add [package]-ptest to 
the image.  The ptest packages recommend ptest-runner automatically, 
so you don't need to pull that in.


Ross


-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] [Yocto] Checking sstate mirror is hanging at 100%

2017-10-31 Thread Vineeth Karumanchi



On 11/1/2017 12:11 AM, Andre McCurdy wrote:

It looks like the logic in the wget fetcher retries once, so if it's getting 
stuck
then that seems like a genuine bug.

Vineeth, are you sure it's really continuously retrying?

Yes, I see continuous retry of wget of same sstate files.

The fetcher explicitly tries to avoid that by retrying each file only
once. See retry logic in:

   
http://git.openembedded.org/bitbake/commit/?id=54b1961551511948e0cbd2ac39f19b39b9cee568

However, there is a later commit which may also be related:

   
http://git.openembedded.org/bitbake/commit/?id=6fa07752bbd3ac345cd8617da49a70e0b2dd565f

Does the version of bitbake which you are using contain both commits?


Thanks Andre
I am not having later patch. I will check the issue with master branch


--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto