All of lore.kernel.org
 help / color / mirror / Atom feed
* runstrip() in package.bbclass fails when run against a kernel module
@ 2012-08-31 11:53 Tomas Frydrych
  2012-09-03  7:08 ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Tomas Frydrych @ 2012-08-31 11:53 UTC (permalink / raw)
  To: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 364 bytes --]


runstrip() in package.bbclass fails when run against a kernel module,
because it tries to do a bitwise & with a 'None' argument. This throws:
TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'.

(This bug triggers, for example, when building ti-linuxutils from
meta-ti (v2012.05-yocto1.2 tag) against Denzil.)

Patch attached.

Tomas


[-- Attachment #2: 0001-package.bbclass-fix-stripping-for-kernel-modules.patch --]
[-- Type: text/x-patch, Size: 1014 bytes --]

From 6abe978d8e0acdb35c1abfed83e775b276b1231f Mon Sep 17 00:00:00 2001
From: Tomas Frydrych <tomas@sleepfive.com>
Date: Fri, 31 Aug 2012 12:02:18 +0100
Subject: [PATCH] package.bbclass: fix stripping for kernel modules

runstrip(path, elftype, d) does bitwise & on the elftype parameter, so it has
to be passed an integer. Passing None fails with: TypeError: unsupported
operand type(s) for &: 'NoneType' and 'int'.

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
---
 meta/classes/package.bbclass |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 44e551f..f046fbb 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -877,7 +877,7 @@ python split_and_strip_files () {
 			for f in files:
 				if not f.endswith(".ko"):
 					continue
-				runstrip(os.path.join(root, f), None, d)
+				runstrip(os.path.join(root, f), 0, d)
 	#
 	# End of strip
 	#
-- 
1.7.10.4



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: runstrip() in package.bbclass fails when run against a kernel module
  2012-08-31 11:53 runstrip() in package.bbclass fails when run against a kernel module Tomas Frydrych
@ 2012-09-03  7:08 ` Martin Jansa
  2012-09-04  9:12   ` Tomas Frydrych
  0 siblings, 1 reply; 6+ messages in thread
From: Martin Jansa @ 2012-09-03  7:08 UTC (permalink / raw)
  To: Tomas Frydrych; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2067 bytes --]

On Fri, Aug 31, 2012 at 12:53:31PM +0100, Tomas Frydrych wrote:
> 
> runstrip() in package.bbclass fails when run against a kernel module,
> because it tries to do a bitwise & with a 'None' argument. This throws:
> TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'.
> 
> (This bug triggers, for example, when building ti-linuxutils from
> meta-ti (v2012.05-yocto1.2 tag) against Denzil.)
> 
> Patch attached.

Was this for denzil?

In master it was fixed a month ago by:
http://git.openembedded.org/openembedded-core/commit/meta/classes/package.bbclass?id=a834ab8a6d53cae504fa112a89bab93d726539ec

Don't know why they merged your patch to master too now..

Cheers,

> 
> Tomas
> 

> From 6abe978d8e0acdb35c1abfed83e775b276b1231f Mon Sep 17 00:00:00 2001
> From: Tomas Frydrych <tomas@sleepfive.com>
> Date: Fri, 31 Aug 2012 12:02:18 +0100
> Subject: [PATCH] package.bbclass: fix stripping for kernel modules
> 
> runstrip(path, elftype, d) does bitwise & on the elftype parameter, so it has
> to be passed an integer. Passing None fails with: TypeError: unsupported
> operand type(s) for &: 'NoneType' and 'int'.
> 
> Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
> ---
>  meta/classes/package.bbclass |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index 44e551f..f046fbb 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -877,7 +877,7 @@ python split_and_strip_files () {
>  			for f in files:
>  				if not f.endswith(".ko"):
>  					continue
> -				runstrip(os.path.join(root, f), None, d)
> +				runstrip(os.path.join(root, f), 0, d)
>  	#
>  	# End of strip
>  	#
> -- 
> 1.7.10.4
> 
> 

> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core


-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: runstrip() in package.bbclass fails when run against a kernel module
  2012-09-03  7:08 ` Martin Jansa
@ 2012-09-04  9:12   ` Tomas Frydrych
  2012-09-04  9:23     ` Martin Jansa
  0 siblings, 1 reply; 6+ messages in thread
From: Tomas Frydrych @ 2012-09-04  9:12 UTC (permalink / raw)
  To: openembedded-core

Hi,

On 03/09/12 08:08, Martin Jansa wrote:
> On Fri, Aug 31, 2012 at 12:53:31PM +0100, Tomas Frydrych wrote:
>>
>> runstrip() in package.bbclass fails when run against a kernel module,
>> because it tries to do a bitwise & with a 'None' argument. This throws:
>> TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'.
> 
> Was this for denzil?
> 
> In master it was fixed a month ago by:
> http://git.openembedded.org/openembedded-core/commit/meta/classes/package.bbclass?id=a834ab8a6d53cae504fa112a89bab93d726539ec
> 
> Don't know why they merged your patch to master too now..

Yes, I run into the bug on Denzil and did not see the alternative fix in
master; either one of those fixes the problem, of course.

Tomas


> 
> Cheers,
> 
>>
>> Tomas
>>
> 
>> From 6abe978d8e0acdb35c1abfed83e775b276b1231f Mon Sep 17 00:00:00 2001
>> From: Tomas Frydrych <tomas@sleepfive.com>
>> Date: Fri, 31 Aug 2012 12:02:18 +0100
>> Subject: [PATCH] package.bbclass: fix stripping for kernel modules
>>
>> runstrip(path, elftype, d) does bitwise & on the elftype parameter, so it has
>> to be passed an integer. Passing None fails with: TypeError: unsupported
>> operand type(s) for &: 'NoneType' and 'int'.
>>
>> Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
>> ---
>>  meta/classes/package.bbclass |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
>> index 44e551f..f046fbb 100644
>> --- a/meta/classes/package.bbclass
>> +++ b/meta/classes/package.bbclass
>> @@ -877,7 +877,7 @@ python split_and_strip_files () {
>>  			for f in files:
>>  				if not f.endswith(".ko"):
>>  					continue
>> -				runstrip(os.path.join(root, f), None, d)
>> +				runstrip(os.path.join(root, f), 0, d)
>>  	#
>>  	# End of strip
>>  	#
>> -- 
>> 1.7.10.4
>>
>>
> 
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> 
> 




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: runstrip() in package.bbclass fails when run against a kernel module
  2012-09-04  9:12   ` Tomas Frydrych
@ 2012-09-04  9:23     ` Martin Jansa
  2012-09-04  9:53       ` Tomas Frydrych
  2012-09-05 16:18       ` Scott Garman
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Jansa @ 2012-09-04  9:23 UTC (permalink / raw)
  To: Tomas Frydrych; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2714 bytes --]

On Tue, Sep 04, 2012 at 10:12:43AM +0100, Tomas Frydrych wrote:
> Hi,
> 
> On 03/09/12 08:08, Martin Jansa wrote:
> > On Fri, Aug 31, 2012 at 12:53:31PM +0100, Tomas Frydrych wrote:
> >>
> >> runstrip() in package.bbclass fails when run against a kernel module,
> >> because it tries to do a bitwise & with a 'None' argument. This throws:
> >> TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'.
> > 
> > Was this for denzil?
> > 
> > In master it was fixed a month ago by:
> > http://git.openembedded.org/openembedded-core/commit/meta/classes/package.bbclass?id=a834ab8a6d53cae504fa112a89bab93d726539ec
> > 
> > Don't know why they merged your patch to master too now..
> 
> Yes, I run into the bug on Denzil and did not see the alternative fix in
> master; either one of those fixes the problem, of course.

Yes but having both in master doesn't make much sense, and someone
already asked the older fix to be merged to denzil.

> 
> Tomas
> 
> 
> > 
> > Cheers,
> > 
> >>
> >> Tomas
> >>
> > 
> >> From 6abe978d8e0acdb35c1abfed83e775b276b1231f Mon Sep 17 00:00:00 2001
> >> From: Tomas Frydrych <tomas@sleepfive.com>
> >> Date: Fri, 31 Aug 2012 12:02:18 +0100
> >> Subject: [PATCH] package.bbclass: fix stripping for kernel modules
> >>
> >> runstrip(path, elftype, d) does bitwise & on the elftype parameter, so it has
> >> to be passed an integer. Passing None fails with: TypeError: unsupported
> >> operand type(s) for &: 'NoneType' and 'int'.
> >>
> >> Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
> >> ---
> >>  meta/classes/package.bbclass |    2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> >> index 44e551f..f046fbb 100644
> >> --- a/meta/classes/package.bbclass
> >> +++ b/meta/classes/package.bbclass
> >> @@ -877,7 +877,7 @@ python split_and_strip_files () {
> >>  			for f in files:
> >>  				if not f.endswith(".ko"):
> >>  					continue
> >> -				runstrip(os.path.join(root, f), None, d)
> >> +				runstrip(os.path.join(root, f), 0, d)
> >>  	#
> >>  	# End of strip
> >>  	#
> >> -- 
> >> 1.7.10.4
> >>
> >>
> > 
> >> _______________________________________________
> >> Openembedded-core mailing list
> >> Openembedded-core@lists.openembedded.org
> >> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
> > 
> > 
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 205 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: runstrip() in package.bbclass fails when run against a kernel module
  2012-09-04  9:23     ` Martin Jansa
@ 2012-09-04  9:53       ` Tomas Frydrych
  2012-09-05 16:18       ` Scott Garman
  1 sibling, 0 replies; 6+ messages in thread
From: Tomas Frydrych @ 2012-09-04  9:53 UTC (permalink / raw)
  To: openembedded-core


On 04/09/12 10:23, Martin Jansa wrote:
>>> Was this for denzil?
>>>
>>> In master it was fixed a month ago by:
>>> http://git.openembedded.org/openembedded-core/commit/meta/classes/package.bbclass?id=a834ab8a6d53cae504fa112a89bab93d726539ec
>>>
>>> Don't know why they merged your patch to master too now..
>>
>> Yes, I run into the bug on Denzil and did not see the alternative fix in
>> master; either one of those fixes the problem, of course.
> 
> Yes but having both in master doesn't make much sense, and someone
> already asked the older fix to be merged to denzil.

I does not do any harm either, but if you prefer to revert that, I will
not complain. (Though, I personally prefer fixing the way the function
was incorrectly called rather than handling a wrong argument inside it. :) )

Tomas




^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: runstrip() in package.bbclass fails when run against a kernel module
  2012-09-04  9:23     ` Martin Jansa
  2012-09-04  9:53       ` Tomas Frydrych
@ 2012-09-05 16:18       ` Scott Garman
  1 sibling, 0 replies; 6+ messages in thread
From: Scott Garman @ 2012-09-05 16:18 UTC (permalink / raw)
  To: openembedded-core

On 09/04/2012 02:23 AM, Martin Jansa wrote:
> On Tue, Sep 04, 2012 at 10:12:43AM +0100, Tomas Frydrych wrote:
>> Hi,
>>
>> On 03/09/12 08:08, Martin Jansa wrote:
>>> On Fri, Aug 31, 2012 at 12:53:31PM +0100, Tomas Frydrych wrote:
>>>>
>>>> runstrip() in package.bbclass fails when run against a kernel module,
>>>> because it tries to do a bitwise & with a 'None' argument. This throws:
>>>> TypeError: unsupported operand type(s) for &: 'NoneType' and 'int'.
>>>
>>> Was this for denzil?
>>>
>>> In master it was fixed a month ago by:
>>> http://git.openembedded.org/openembedded-core/commit/meta/classes/package.bbclass?id=a834ab8a6d53cae504fa112a89bab93d726539ec
>>>
>>> Don't know why they merged your patch to master too now..
>>
>> Yes, I run into the bug on Denzil and did not see the alternative fix in
>> master; either one of those fixes the problem, of course.
>
> Yes but having both in master doesn't make much sense, and someone
> already asked the older fix to be merged to denzil.

Yes, Koen included it in his most recent denzil pull request. I have it 
queued in my denzil-next test branch and I'm waiting for autobuilder 
time to validate it before I submit a pull request to move it all into 
oe-core denzil:

http://git.openembedded.org/openembedded-core-contrib/log/?h=sgarman/denzil-next

Scott

-- 
Scott Garman
Embedded Linux Engineer - Yocto Project
Intel Open Source Technology Center



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-05 16:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-31 11:53 runstrip() in package.bbclass fails when run against a kernel module Tomas Frydrych
2012-09-03  7:08 ` Martin Jansa
2012-09-04  9:12   ` Tomas Frydrych
2012-09-04  9:23     ` Martin Jansa
2012-09-04  9:53       ` Tomas Frydrych
2012-09-05 16:18       ` Scott Garman

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.