runstrip() in package.bbclass fails when run against a kernel module
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
From 6abe978d8e0acdb35c1abfed83e775b276b1231f Mon Sep 17 00:00:00 2001
From: Tomas Frydrych <[email protected]>
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'.
--- meta/classes/package.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/package.bbclass +1 -1
@@ -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 #
Signature · 1 line
1.7.10.4
Quoted 9 lines · Tomas Frydrych
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,
Quoted 40 lines
Tomas
From
6abe978d8e0acdb35c1abfed83e775b276b1231fMon Sep 17 00:00:00 2001
From: Tomas Frydrych <[email protected]>
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 <[email protected]>--- meta/classes/package.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/package.bbclass +1
-1@@ -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 #Signature · 8 lines
1.7.10.4 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Hi,
Quoted 6 lines · Martin Jansa
Quoted 4 lines · Tomas Frydrych
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'.
Quoted 6 lines
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=a834ab8a6d53cae504fa112a89bab93d726539ecDon'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
Quoted 45 lines
Cheers,
Quoted 40 lines
Tomas
From
6abe978d8e0acdb35c1abfed83e775b276b1231fMon Sep 17 00:00:00 2001
From: Tomas Frydrych <[email protected]>
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 <[email protected]>--- meta/classes/package.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/package.bbclass +1
-1@@ -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 #Signature · 8 lines
1.7.10.4 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Quoted 11 lines · Tomas Frydrych
Hi,
Quoted 8 lines · Martin Jansa
Quoted 4 lines · Tomas Frydrych
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?
Quoted 7 lines
Quoted 4 lines
In master it was fixed a month ago by:
http://git.openembedded.org/openembedded-core/commit/meta/classes/package.bbclass?id=a834ab8a6d53cae504fa112a89bab93d726539ecDon'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.
Quoted 55 lines
Tomas
Quoted 45 lines
Cheers,
Quoted 40 lines
Tomas
From
6abe978d8e0acdb35c1abfed83e775b276b1231fMon Sep 17 00:00:00 2001
From: Tomas Frydrych <[email protected]>
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 <[email protected]>--- meta/classes/package.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/classes/package.bbclass +1
-1@@ -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 #Signature · 8 lines
1.7.10.4 _______________________________________________ Openembedded-core mailing list [email protected] http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Quoted 5 lines · Martin Jansa
Quoted 5 lines
Quoted 5 lines
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
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
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
Quoted 15 lines · Martin Jansa
Quoted 14 lines · Tomas Frydrych
Hi,
Quoted 11 lines · Martin Jansa
Quoted 4 lines · Tomas Frydrych
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
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
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
Signature · 3 lines
Scott Garman Embedded Linux Engineer - Yocto Project Intel Open Source Technology Center