* [RFC] Blubber, a tool to set up yocto/poky projects easily @ 2014-03-10 10:59 Josef Holzmayr 2014-03-10 11:05 ` Vali Cobelea 2014-03-10 15:52 ` Marc Ferland 0 siblings, 2 replies; 12+ messages in thread From: Josef Holzmayr @ 2014-03-10 10:59 UTC (permalink / raw) To: yocto Howdy! After looking more and more into yocto, one of the main issues for me is the process to set up a project properly, including all layers and conf options. Especially those which would be needed to set exactly the same way again and again every time somebody needs to reproduce a build. So I've come up with an idea: a small tool that can handle these things for me. And here it is for your enjoyment/use/abuse/comments: https://github.com/LetoThe2nd/blubber Short excerpt from the README: But be warned first. Blubber is still in pre-pre-pre-alpha stage (more like a proof of concept), and has the following defects/bugs/non-features: - Horribly bad python code (Yes, its really that bad. Blame me, its my first attempt to use that language) - No error checking whatsoever - Largely incomplete feature set - Did I already mention the utterly bad code? - Only supports git sources so far. Despite that, it can already do some magic: - Getting poky and layers from git, and checking out branches/tags/commits if needed - Accordingly setting up build/conf/bblayers.conf - Setting up build/conf/local.conf with a set of predefined options - Running arbitrary commands with proper shell setup (source-ed poky/oe-init-build-env) for the configured project. If anybody has feedback, just scream loudly. Or if anybody knows of a better solution making it all obsolete, please also scream. Thanks! Leto ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 10:59 [RFC] Blubber, a tool to set up yocto/poky projects easily Josef Holzmayr @ 2014-03-10 11:05 ` Vali Cobelea 2014-03-10 11:11 ` Josef Holzmayr 2014-03-10 15:52 ` Marc Ferland 1 sibling, 1 reply; 12+ messages in thread From: Vali Cobelea @ 2014-03-10 11:05 UTC (permalink / raw) To: Josef Holzmayr, yocto Hi Josef, Looks ok at a first look, but my first suggestion would be to start using the "is" operator instead of "==" when it comes to comparing strings. Otherwise using your way with "==" will crash if any of the variables (those "sys.argv[]") are None (void). Best regards, Vali On 03/10/2014 12:59 PM, Josef Holzmayr wrote: > Howdy! > > After looking more and more into yocto, one of the main issues for me is the > process to set up a project properly, including all layers and conf options. > Especially those which would be needed to set exactly the same way again and > again every time somebody needs to reproduce a build. > > So I've come up with an idea: a small tool that can handle these things for me. > And here it is for your enjoyment/use/abuse/comments: > > https://github.com/LetoThe2nd/blubber > > Short excerpt from the README: > > But be warned first. Blubber is still in pre-pre-pre-alpha stage (more like a > proof of concept), and has the following defects/bugs/non-features: > - Horribly bad python code (Yes, its really that bad. Blame me, its my first > attempt to use that language) > - No error checking whatsoever > - Largely incomplete feature set > - Did I already mention the utterly bad code? > - Only supports git sources so far. > > Despite that, it can already do some magic: > - Getting poky and layers from git, and checking out branches/tags/commits if > needed > - Accordingly setting up build/conf/bblayers.conf > - Setting up build/conf/local.conf with a set of predefined options > - Running arbitrary commands with proper shell setup (source-ed > poky/oe-init-build-env) for the configured project. > > If anybody has feedback, just scream loudly. Or if anybody knows of a better > solution making it all obsolete, please also scream. Thanks! > > Leto ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 11:05 ` Vali Cobelea @ 2014-03-10 11:11 ` Josef Holzmayr 2014-03-10 11:20 ` Vali Cobelea 0 siblings, 1 reply; 12+ messages in thread From: Josef Holzmayr @ 2014-03-10 11:11 UTC (permalink / raw) To: yocto, Vali Cobelea Hello Vali, > Vali Cobelea <valentin.cobelea@enea.com> hat am 10. März 2014 um 12:05 > geschrieben: > > Looks ok at a first look, but my first suggestion would be to start > using the "is" operator instead of "==" when it comes to comparing strings. > Otherwise using your way with "==" will crash if any of the variables > (those "sys.argv[]") are None (void). Thanks for the quick input! However, this is one of the very rare points I intently did that way, because of the difference in meaning from "==" to "is" (see http://stackoverflow.com/questions/1504717/why-does-comparing-strings-in-python-using-either-or-is-sometimes-produce). But I'm curious, how would one then properly compare the content of two strings? Checking both types first? > > Best regards, > Vali Greetz Josef/Leto > > > On 03/10/2014 12:59 PM, Josef Holzmayr wrote: > > Howdy! > > > > After looking more and more into yocto, one of the main issues for me is the > > process to set up a project properly, including all layers and conf options. > > Especially those which would be needed to set exactly the same way again and > > again every time somebody needs to reproduce a build. > > > > So I've come up with an idea: a small tool that can handle these things for > > me. > > And here it is for your enjoyment/use/abuse/comments: > > > > https://github.com/LetoThe2nd/blubber > > > > Short excerpt from the README: > > > > But be warned first. Blubber is still in pre-pre-pre-alpha stage (more like > > a > > proof of concept), and has the following defects/bugs/non-features: > > - Horribly bad python code (Yes, its really that bad. Blame me, its my first > > attempt to use that language) > > - No error checking whatsoever > > - Largely incomplete feature set > > - Did I already mention the utterly bad code? > > - Only supports git sources so far. > > > > Despite that, it can already do some magic: > > - Getting poky and layers from git, and checking out branches/tags/commits > > if > > needed > > - Accordingly setting up build/conf/bblayers.conf > > - Setting up build/conf/local.conf with a set of predefined options > > - Running arbitrary commands with proper shell setup (source-ed > > poky/oe-init-build-env) for the configured project. > > > > If anybody has feedback, just scream loudly. Or if anybody knows of a better > > solution making it all obsolete, please also scream. Thanks! > > > > Leto > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 11:11 ` Josef Holzmayr @ 2014-03-10 11:20 ` Vali Cobelea 2014-03-10 11:32 ` Josef Holzmayr 0 siblings, 1 reply; 12+ messages in thread From: Vali Cobelea @ 2014-03-10 11:20 UTC (permalink / raw) To: Josef Holzmayr, yocto Hi, I would advise to use the official documentation of Python : http://docs.python.org/2/library/stdtypes.html . But if you do want to stick with the stackoverflow advises : http://stackoverflow.com/questions/2988017/string-comparison-in-python-is-vs The idea behind 'is' would be to have more safety and less crashes when one of the arguments, in your case, is empty (eg None). This discussion can go over and over, is more a flavor thing: being pythonian or not. Best regards, Vali On 03/10/2014 01:11 PM, Josef Holzmayr wrote: > Hello Vali, > >> Vali Cobelea <valentin.cobelea@enea.com> hat am 10. März 2014 um 12:05 >> geschrieben: >> >> Looks ok at a first look, but my first suggestion would be to start >> using the "is" operator instead of "==" when it comes to comparing strings. >> Otherwise using your way with "==" will crash if any of the variables >> (those "sys.argv[]") are None (void). > Thanks for the quick input! However, this is one of the very rare points I > intently did that way, because of the difference in meaning from "==" to "is" > (see > http://stackoverflow.com/questions/1504717/why-does-comparing-strings-in-python-using-either-or-is-sometimes-produce). > But I'm curious, how would one then properly compare the content of two strings? > Checking both types first? > >> Best regards, >> Vali > Greetz > Josef/Leto > >> >> On 03/10/2014 12:59 PM, Josef Holzmayr wrote: >>> Howdy! >>> >>> After looking more and more into yocto, one of the main issues for me is the >>> process to set up a project properly, including all layers and conf options. >>> Especially those which would be needed to set exactly the same way again and >>> again every time somebody needs to reproduce a build. >>> >>> So I've come up with an idea: a small tool that can handle these things for >>> me. >>> And here it is for your enjoyment/use/abuse/comments: >>> >>> https://github.com/LetoThe2nd/blubber >>> >>> Short excerpt from the README: >>> >>> But be warned first. Blubber is still in pre-pre-pre-alpha stage (more like >>> a >>> proof of concept), and has the following defects/bugs/non-features: >>> - Horribly bad python code (Yes, its really that bad. Blame me, its my first >>> attempt to use that language) >>> - No error checking whatsoever >>> - Largely incomplete feature set >>> - Did I already mention the utterly bad code? >>> - Only supports git sources so far. >>> >>> Despite that, it can already do some magic: >>> - Getting poky and layers from git, and checking out branches/tags/commits >>> if >>> needed >>> - Accordingly setting up build/conf/bblayers.conf >>> - Setting up build/conf/local.conf with a set of predefined options >>> - Running arbitrary commands with proper shell setup (source-ed >>> poky/oe-init-build-env) for the configured project. >>> >>> If anybody has feedback, just scream loudly. Or if anybody knows of a better >>> solution making it all obsolete, please also scream. Thanks! >>> >>> Leto ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 11:20 ` Vali Cobelea @ 2014-03-10 11:32 ` Josef Holzmayr 2014-03-10 11:43 ` Alex J Lennon 0 siblings, 1 reply; 12+ messages in thread From: Josef Holzmayr @ 2014-03-10 11:32 UTC (permalink / raw) To: yocto, Vali Cobelea Hello Vali, > Vali Cobelea <valentin.cobelea@enea.com> hat am 10. März 2014 um 12:20 > geschrieben: > > The idea behind 'is' would be to have more safety and less crashes when > one of the arguments, in your case, is empty (eg None). Well there are cases where I needed to compare strings that have been read in and then modified from two different sources (e.g., files). Hence in my understanding, they have the same content, but not the same id. So if I want to match their content only, I'd have to use "==" because "is" would give me false even if the content matches. > This discussion can go over and over, is more a flavor thing: being > pythonian or not. Agreed, with the exception of the above said. But you're right, I'll look into the topic and see if it can bring improvements. Thanks again for your input. > > Best regards, > Vali Greetz Josef /Leto > > On 03/10/2014 01:11 PM, Josef Holzmayr wrote: > > Hello Vali, > > > >> Vali Cobelea <valentin.cobelea@enea.com> hat am 10. März 2014 um 12:05 > >> geschrieben: > >> > >> Looks ok at a first look, but my first suggestion would be to start > >> using the "is" operator instead of "==" when it comes to comparing strings. > >> Otherwise using your way with "==" will crash if any of the variables > >> (those "sys.argv[]") are None (void). > > Thanks for the quick input! However, this is one of the very rare points I > > intently did that way, because of the difference in meaning from "==" to > > "is" > > (see > > http://stackoverflow.com/questions/1504717/why-does-comparing-strings-in-python-using-either-or-is-sometimes-produce). > > But I'm curious, how would one then properly compare the content of two > > strings? > > Checking both types first? > > > >> Best regards, > >> Vali > > Greetz > > Josef/Leto > > > >> > >> On 03/10/2014 12:59 PM, Josef Holzmayr wrote: > >>> Howdy! > >>> > >>> After looking more and more into yocto, one of the main issues for me is > >>> the > >>> process to set up a project properly, including all layers and conf > >>> options. > >>> Especially those which would be needed to set exactly the same way again > >>> and > >>> again every time somebody needs to reproduce a build. > >>> > >>> So I've come up with an idea: a small tool that can handle these things > >>> for > >>> me. > >>> And here it is for your enjoyment/use/abuse/comments: > >>> > >>> https://github.com/LetoThe2nd/blubber > >>> > >>> Short excerpt from the README: > >>> > >>> But be warned first. Blubber is still in pre-pre-pre-alpha stage (more > >>> like > >>> a > >>> proof of concept), and has the following defects/bugs/non-features: > >>> - Horribly bad python code (Yes, its really that bad. Blame me, its my > >>> first > >>> attempt to use that language) > >>> - No error checking whatsoever > >>> - Largely incomplete feature set > >>> - Did I already mention the utterly bad code? > >>> - Only supports git sources so far. > >>> > >>> Despite that, it can already do some magic: > >>> - Getting poky and layers from git, and checking out branches/tags/commits > >>> if > >>> needed > >>> - Accordingly setting up build/conf/bblayers.conf > >>> - Setting up build/conf/local.conf with a set of predefined options > >>> - Running arbitrary commands with proper shell setup (source-ed > >>> poky/oe-init-build-env) for the configured project. > >>> > >>> If anybody has feedback, just scream loudly. Or if anybody knows of a > >>> better > >>> solution making it all obsolete, please also scream. Thanks! > >>> > >>> Leto > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 11:32 ` Josef Holzmayr @ 2014-03-10 11:43 ` Alex J Lennon 2014-03-10 12:02 ` Josef Holzmayr 0 siblings, 1 reply; 12+ messages in thread From: Alex J Lennon @ 2014-03-10 11:43 UTC (permalink / raw) To: Josef Holzmayr, Vali Cobelea; +Cc: yocto On 10/03/2014 11:32, Josef Holzmayr wrote: > Hello Vali, > >> Vali Cobelea <valentin.cobelea@enea.com> hat am 10. März 2014 um 12:20 >> geschrieben: >> >> The idea behind 'is' would be to have more safety and less crashes when >> one of the arguments, in your case, is empty (eg None). > Well there are cases where I needed to compare strings that have been read in > and then modified from two different sources (e.g., files). Hence in my > understanding, they have the same content, but not the same id. So if I want to > match their content only, I'd have to use "==" because "is" would give me false > even if the content matches. Hi Josef, Vali, Interesting points. fwiw I'd have thought myself that string comparison should be string comparison (==) as if you use an object identity comparison as a string comparison (is), you potentially introduce opaque problems when the strings are the same - i.e. same bytes of data - but the objects are not the same for whatever reason. e.g. stringvar1 = "A string for comparison" stringvar2 = "A string for " stringvar2 += "comparison"; if stringvar1 == stringvar2: print stringvar1 + " == " + stringvar2 else: print stringvar1 + " != " + stringvar2 if stringvar1 is stringvar2: print stringvar1 + " is " + stringvar2 else: print stringvar1 + " is not " + stringvar2 Results in, A string for comparison == A string for comparison A string for comparison is not A string for comparison Cheers, Alex >> This discussion can go over and over, is more a flavor thing: being >> pythonian or not. > Agreed, with the exception of the above said. But you're right, I'll look into > the topic and see if it can bring improvements. Thanks again for your input. > >> Best regards, >> Vali > Greetz > Josef /Leto > >> On 03/10/2014 01:11 PM, Josef Holzmayr wrote: >>> Hello Vali, >>> >>>> Vali Cobelea <valentin.cobelea@enea.com> hat am 10. März 2014 um 12:05 >>>> geschrieben: >>>> >>>> Looks ok at a first look, but my first suggestion would be to start >>>> using the "is" operator instead of "==" when it comes to comparing strings. >>>> Otherwise using your way with "==" will crash if any of the variables >>>> (those "sys.argv[]") are None (void). >>> Thanks for the quick input! However, this is one of the very rare points I >>> intently did that way, because of the difference in meaning from "==" to >>> "is" >>> (see >>> http://stackoverflow.com/questions/1504717/why-does-comparing-strings-in-python-using-either-or-is-sometimes-produce). >>> But I'm curious, how would one then properly compare the content of two >>> strings? >>> Checking both types first? >>> >>>> Best regards, >>>> Vali >>> Greetz >>> Josef/Leto >>> >>>> On 03/10/2014 12:59 PM, Josef Holzmayr wrote: >>>>> Howdy! >>>>> >>>>> After looking more and more into yocto, one of the main issues for me is >>>>> the >>>>> process to set up a project properly, including all layers and conf >>>>> options. >>>>> Especially those which would be needed to set exactly the same way again >>>>> and >>>>> again every time somebody needs to reproduce a build. >>>>> >>>>> So I've come up with an idea: a small tool that can handle these things >>>>> for >>>>> me. >>>>> And here it is for your enjoyment/use/abuse/comments: >>>>> >>>>> https://github.com/LetoThe2nd/blubber >>>>> >>>>> Short excerpt from the README: >>>>> >>>>> But be warned first. Blubber is still in pre-pre-pre-alpha stage (more >>>>> like >>>>> a >>>>> proof of concept), and has the following defects/bugs/non-features: >>>>> - Horribly bad python code (Yes, its really that bad. Blame me, its my >>>>> first >>>>> attempt to use that language) >>>>> - No error checking whatsoever >>>>> - Largely incomplete feature set >>>>> - Did I already mention the utterly bad code? >>>>> - Only supports git sources so far. >>>>> >>>>> Despite that, it can already do some magic: >>>>> - Getting poky and layers from git, and checking out branches/tags/commits >>>>> if >>>>> needed >>>>> - Accordingly setting up build/conf/bblayers.conf >>>>> - Setting up build/conf/local.conf with a set of predefined options >>>>> - Running arbitrary commands with proper shell setup (source-ed >>>>> poky/oe-init-build-env) for the configured project. >>>>> >>>>> If anybody has feedback, just scream loudly. Or if anybody knows of a >>>>> better >>>>> solution making it all obsolete, please also scream. Thanks! >>>>> >>>>> Leto ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 11:43 ` Alex J Lennon @ 2014-03-10 12:02 ` Josef Holzmayr 2014-03-10 14:40 ` Chris Larson 0 siblings, 1 reply; 12+ messages in thread From: Josef Holzmayr @ 2014-03-10 12:02 UTC (permalink / raw) To: Alex J Lennon, Vali Cobelea; +Cc: yocto Hello Alex, > Alex J Lennon <ajlennon@dynamicdevices.co.uk> hat am 10. März 2014 um 12:43 > geschrieben: > fwiw I'd have thought myself that string comparison should be string > comparison (==) as if you use an object identity comparison as a string > comparison (is), you potentially introduce opaque problems when the > strings are the same - i.e. same bytes of data - but the objects are not > the same for whatever reason. I've interpreted it roughly the same so far, but they ValueError point seems to valid to me too (gah, I really know why I usually avoid dynamically typed languages!). But the solution for me in this context seems to be then to use something like: DUMMYSTRING = "foobar" def safestringcompare(stra, strb): return type(DUMMYSTRING) == type(stra) and type(stra) == type(strb) and stra == strb > Cheers, > > Alex Greetz Josef/Leto > > >> This discussion can go over and over, is more a flavor thing: being > >> pythonian or not. > > Agreed, with the exception of the above said. But you're right, I'll look > > into > > the topic and see if it can bring improvements. Thanks again for your input. > > > >> Best regards, > >> Vali > > Greetz > > Josef /Leto > > > >> On 03/10/2014 01:11 PM, Josef Holzmayr wrote: > >>> Hello Vali, > >>> > >>>> Vali Cobelea <valentin.cobelea@enea.com> hat am 10. März 2014 um 12:05 > >>>> geschrieben: > >>>> > >>>> Looks ok at a first look, but my first suggestion would be to start > >>>> using the "is" operator instead of "==" when it comes to comparing > >>>> strings. > >>>> Otherwise using your way with "==" will crash if any of the variables > >>>> (those "sys.argv[]") are None (void). > >>> Thanks for the quick input! However, this is one of the very rare points I > >>> intently did that way, because of the difference in meaning from "==" to > >>> "is" > >>> (see > >>> http://stackoverflow.com/questions/1504717/why-does-comparing-strings-in-python-using-either-or-is-sometimes-produce). > >>> But I'm curious, how would one then properly compare the content of two > >>> strings? > >>> Checking both types first? > >>> > >>>> Best regards, > >>>> Vali > >>> Greetz > >>> Josef/Leto > >>> > >>>> On 03/10/2014 12:59 PM, Josef Holzmayr wrote: > >>>>> Howdy! > >>>>> > >>>>> After looking more and more into yocto, one of the main issues for me is > >>>>> the > >>>>> process to set up a project properly, including all layers and conf > >>>>> options. > >>>>> Especially those which would be needed to set exactly the same way again > >>>>> and > >>>>> again every time somebody needs to reproduce a build. > >>>>> > >>>>> So I've come up with an idea: a small tool that can handle these things > >>>>> for > >>>>> me. > >>>>> And here it is for your enjoyment/use/abuse/comments: > >>>>> > >>>>> https://github.com/LetoThe2nd/blubber > >>>>> > >>>>> Short excerpt from the README: > >>>>> > >>>>> But be warned first. Blubber is still in pre-pre-pre-alpha stage (more > >>>>> like > >>>>> a > >>>>> proof of concept), and has the following defects/bugs/non-features: > >>>>> - Horribly bad python code (Yes, its really that bad. Blame me, its my > >>>>> first > >>>>> attempt to use that language) > >>>>> - No error checking whatsoever > >>>>> - Largely incomplete feature set > >>>>> - Did I already mention the utterly bad code? > >>>>> - Only supports git sources so far. > >>>>> > >>>>> Despite that, it can already do some magic: > >>>>> - Getting poky and layers from git, and checking out > >>>>> branches/tags/commits > >>>>> if > >>>>> needed > >>>>> - Accordingly setting up build/conf/bblayers.conf > >>>>> - Setting up build/conf/local.conf with a set of predefined options > >>>>> - Running arbitrary commands with proper shell setup (source-ed > >>>>> poky/oe-init-build-env) for the configured project. > >>>>> > >>>>> If anybody has feedback, just scream loudly. Or if anybody knows of a > >>>>> better > >>>>> solution making it all obsolete, please also scream. Thanks! > >>>>> > >>>>> Leto > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 12:02 ` Josef Holzmayr @ 2014-03-10 14:40 ` Chris Larson 2014-03-10 14:45 ` Josef Holzmayr 0 siblings, 1 reply; 12+ messages in thread From: Chris Larson @ 2014-03-10 14:40 UTC (permalink / raw) To: Josef Holzmayr; +Cc: yocto [-- Attachment #1: Type: text/plain, Size: 1316 bytes --] On Mon, Mar 10, 2014 at 5:02 AM, Josef Holzmayr < jholzmayr@the-exact-steps.net> wrote: > Hello Alex, > > > Alex J Lennon <ajlennon@dynamicdevices.co.uk> hat am 10. März 2014 um > 12:43 > > geschrieben: > > > fwiw I'd have thought myself that string comparison should be string > > comparison (==) as if you use an object identity comparison as a string > > comparison (is), you potentially introduce opaque problems when the > > strings are the same - i.e. same bytes of data - but the objects are not > > the same for whatever reason. > > I've interpreted it roughly the same so far, but they ValueError point > seems to > valid to me too (gah, I really know why I usually avoid dynamically typed > languages!). But the solution for me in this context seems to be then to > use > something like: > > DUMMYSTRING = "foobar" > def safestringcompare(stra, strb): > return type(DUMMYSTRING) == type(stra) and type(stra) == type(strb) and > stra > == strb > Strings should be compared with ==, not is. And there's nothing that will explode if you compare against None with ==. Try it yourself. >>> "foo" == None False -- Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics [-- Attachment #2: Type: text/html, Size: 1964 bytes --] ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 14:40 ` Chris Larson @ 2014-03-10 14:45 ` Josef Holzmayr 0 siblings, 0 replies; 12+ messages in thread From: Josef Holzmayr @ 2014-03-10 14:45 UTC (permalink / raw) To: Chris Larson; +Cc: yocto Hello Chris > Chris Larson <clarson@kergoth.com> hat am 10. März 2014 um 15:40 geschrieben: > > > On Mon, Mar 10, 2014 at 5:02 AM, Josef Holzmayr < > jholzmayr@the-exact-steps.net> wrote: > > > Hello Alex, > > > > > Alex J Lennon <ajlennon@dynamicdevices.co.uk> hat am 10. März 2014 um > > 12:43 > > > geschrieben: > > > > > fwiw I'd have thought myself that string comparison should be string > > > comparison (==) as if you use an object identity comparison as a string > > > comparison (is), you potentially introduce opaque problems when the > > > strings are the same - i.e. same bytes of data - but the objects are not > > > the same for whatever reason. > > > > I've interpreted it roughly the same so far, but they ValueError point > > seems to > > valid to me too (gah, I really know why I usually avoid dynamically typed > > languages!). But the solution for me in this context seems to be then to > > use > > something like: > > > > DUMMYSTRING = "foobar" > > def safestringcompare(stra, strb): > > return type(DUMMYSTRING) == type(stra) and type(stra) == type(strb) and > > stra > > == strb > > > > Strings should be compared with ==, not is. And there's nothing that will > explode if you compare against None with ==. Try it yourself. > > >>> "foo" == None > False Yes. You're right. Makes me feel even worse about my python knowledge, but at least it seems the topic is clarified now. Thanks for that! Greetz Josef/Leto ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 10:59 [RFC] Blubber, a tool to set up yocto/poky projects easily Josef Holzmayr 2014-03-10 11:05 ` Vali Cobelea @ 2014-03-10 15:52 ` Marc Ferland 2014-03-10 16:15 ` Josef Holzmayr 1 sibling, 1 reply; 12+ messages in thread From: Marc Ferland @ 2014-03-10 15:52 UTC (permalink / raw) To: Josef Holzmayr; +Cc: yocto On Mon, Mar 10, 2014 at 11:59:08AM +0100, Josef Holzmayr wrote: > Howdy! > > After looking more and more into yocto, one of the main issues for me is the > process to set up a project properly, including all layers and conf options. > Especially those which would be needed to set exactly the same way again and > again every time somebody needs to reproduce a build. > > So I've come up with an idea: a small tool that can handle these things for me. > And here it is for your enjoyment/use/abuse/comments: > You should have a look at the 'repo' tool from the android community. I think it already does part of what you're trying to do here. The freescale yocto bsp already uses repo: https://github.com/Freescale/fsl-community-bsp-platform Cheers! Marc ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 15:52 ` Marc Ferland @ 2014-03-10 16:15 ` Josef Holzmayr 2014-03-11 11:41 ` David Nyström 0 siblings, 1 reply; 12+ messages in thread From: Josef Holzmayr @ 2014-03-10 16:15 UTC (permalink / raw) To: ferlandm; +Cc: yocto Hello Marc, > Marc Ferland <ferlandm@sonatest.com> hat am 10. März 2014 um 16:52 > geschrieben: > > > On Mon, Mar 10, 2014 at 11:59:08AM +0100, Josef Holzmayr wrote: > > Howdy! > > > > After looking more and more into yocto, one of the main issues for me is the > > process to set up a project properly, including all layers and conf options. > > Especially those which would be needed to set exactly the same way again and > > again every time somebody needs to reproduce a build. > > > > So I've come up with an idea: a small tool that can handle these things for > > me. > > And here it is for your enjoyment/use/abuse/comments: > > > You should have a look at the 'repo' tool from the android > community. I think it already does part of what you're trying to do > here. > > The freescale yocto bsp already uses repo: > https://github.com/Freescale/fsl-community-bsp-platform Yes indeed, it is quite a nice tool for doing the first part of the job. Thanks for pointing out, will look into it more really soon. > Cheers! > > Marc Greetz Josef/Leto ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [RFC] Blubber, a tool to set up yocto/poky projects easily 2014-03-10 16:15 ` Josef Holzmayr @ 2014-03-11 11:41 ` David Nyström 0 siblings, 0 replies; 12+ messages in thread From: David Nyström @ 2014-03-11 11:41 UTC (permalink / raw) To: Josef Holzmayr, ferlandm; +Cc: yocto On 2014-03-10 17:15, Josef Holzmayr wrote: > Hello Marc, > >> Marc Ferland <ferlandm@sonatest.com> hat am 10. März 2014 um 16:52 >> geschrieben: >> >> >> On Mon, Mar 10, 2014 at 11:59:08AM +0100, Josef Holzmayr wrote: >>> Howdy! >>> >>> After looking more and more into yocto, one of the main issues for me is the >>> process to set up a project properly, including all layers and conf options. >>> Especially those which would be needed to set exactly the same way again and >>> again every time somebody needs to reproduce a build. >>> >>> So I've come up with an idea: a small tool that can handle these things for >>> me. >>> And here it is for your enjoyment/use/abuse/comments: >>> >> You should have a look at the 'repo' tool from the android >> community. I think it already does part of what you're trying to do >> here. >> >> The freescale yocto bsp already uses repo: >> https://github.com/Freescale/fsl-community-bsp-platform > > Yes indeed, it is quite a nice tool for doing the first part of the job. Thanks > for pointing out, will look into it more really soon. > Perhaps $TEMPLATECONF functionality may be relevant for the second part? >> Cheers! >> >> Marc > > Greetz > Josef/Leto > ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2014-03-11 11:41 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-03-10 10:59 [RFC] Blubber, a tool to set up yocto/poky projects easily Josef Holzmayr 2014-03-10 11:05 ` Vali Cobelea 2014-03-10 11:11 ` Josef Holzmayr 2014-03-10 11:20 ` Vali Cobelea 2014-03-10 11:32 ` Josef Holzmayr 2014-03-10 11:43 ` Alex J Lennon 2014-03-10 12:02 ` Josef Holzmayr 2014-03-10 14:40 ` Chris Larson 2014-03-10 14:45 ` Josef Holzmayr 2014-03-10 15:52 ` Marc Ferland 2014-03-10 16:15 ` Josef Holzmayr 2014-03-11 11:41 ` David Nyström
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.