[OE-core] [PATCH 8/8] devtool: add sdk.py plugin

Paul Eggleton paul.eggleton at linux.intel.com
Wed Aug 12 16:41:48 UTC 2015


On Monday 10 August 2015 11:18:06 Chen Qi wrote:
> E.g.
> devtool sdk-update /mnt/sdk-repo/
> devtool sdk-update http://mysdkhost/sdk

As noted by Chris we definitely need a better commit message here.

> +        logger.debug("Updating meta data via git ...")
> +        ret = subprocess.call("rm -rf layers && git clone %s/layers" %
> args.updateserver, shell=True) 
> +        if ret != 0:
> +            logger.error("Updating meta data via git clone failed")
> +            return ret

If we're using git we should at least try to pull (assuming we update the 
remote URL first in case the update server is different); if the pull fails we 
can fall back to rm -rf and clone. (Actually, would git pull -f work if the 
remote repo is completely different?)

> +
> +def register_commands(subparsers, context):
> +    """Register devtool subcommands from the sdk plugin"""
> +    parser_sdk = subparsers.add_parser('sdk-update', help='Update SDK
> components from a nominated destination')
> +    parser_sdk.add_argument('updateserver', help='The update server to
> fetch latest SDK components')
> +    parser_sdk.set_defaults(func=sdk_update)

Could you please add a check here for context.fixed_setup before adding the 
sdk-update command - since this command is only useful within the extensible 
SDK and should not be accessible when devtool is running next to a full 
install of the build system.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the Openembedded-core mailing list