Hi Konrad, Thanks, that helps a lot. It works! I used straight split() which prevented the first value from being null.
Yes, I agree less pythonic :) The only recipe I've seen building gn based projects is OSSystem's meta-browser/chromium. I followed it's pattern, as the Flutter Engine is a derivative of Chrome. The issue with these large gn based projects is that they're self contained builds. A build system within a build system. I must admit though the gclient DEPS download scheme is efficient. I initially looked at parsing out the DEPs file into a large SRC_URI list, but quickly hit Yocto serializing them. Perhaps OE could benefit from tighter integration with gn. I'm open to any other alternative approaches. Cheers, Joel On Wed, Apr 1, 2020 at 1:09 PM Konrad Weihmann <[email protected]> wrote: > Hi Joel, > > okay, I see - although I have to admit the argparse idea looks very weird, > the error is that according to > > https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.parse_args > the pkgconfig_args variable should be a list not a single string. > > so doing pkgconfig_args = d.getVar("PACKAGECONFIG_CONFARGS").split(" ") > should fix the issue. > But from a bitbake perspective you should really think about choosing a > less pythonic version > > Best > > Konrad > On 01.04.20 22:00, Joel Winarske wrote: > > Hi Konrad, > > I left out the details of the path encoding :) Effectively I was > attempting to duplicate get_out_dir() as found here: > https://github.com/flutter/engine/blob/master/tools/gn > > My recipe is here: > https://github.com/jwinarske/meta-flutter/blob/zeus/recipes-graphics/flutter-engine/flutter-engine_git.bb > > Cheers, > Joel > > On Wed, Apr 1, 2020 at 10:46 AM Konrad Weihmann <[email protected]> > wrote: > >> There is a single tick missing, but I'm sure you get the point >> On 01.04.20 19:37, Konrad Weihmann wrote: >> >> What about >> >> do_configure() { >> >> cd ${@bb.utils.contains('PACKAGECONFIG_CONFARGS', '--verbose', >> out/verbose', 'out', d)} >> >> } >> On 01.04.20 18:55, Joel Winarske wrote: >> >> Hello, >> >> I'm trying the below in a recipe. Bitbake gives me: ERROR: Unable to >> parse ...: Exited with "2" >> >> inherit python3native >> >> require utils.inc >> >> do_configure() { >> >> cd ${@get_out_dir(d)} >> } >> >> (in utils.inc) >> def get_out_dir(d): >> import os >> import argparse >> pkgconfig_args = d.getVar("PACKAGECONFIG_CONFARGS") >> >> parser = argparse.ArgumentParser() >> parser.add_argument("--verbose", help="increase output verbosity", >> action="store_true") >> args = parser.parse_args(pkgconfig_args) >> if args.verbose: >> return os.path.join('out', 'verbose') >> >> return 'out' >> >> >> >> What am I doing wrong, or is there a better way? Seems like it doesn't >> like "args = parser.parse_args(pkgconfig_args)" >> >> The output directory is a combination of the arguments. >> >> >> Thanks! >> Joel >> >> >> >> >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#49016): https://lists.yoctoproject.org/g/yocto/message/49016 Mute This Topic: https://lists.yoctoproject.org/mt/72705531/21656 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
