[OE-core] [PATCH] RFC - combo layer repo tool

Paul Eggleton paul.eggleton at intel.com
Fri Jun 17 17:42:49 UTC 2011


Hi Ke,

Great work. Here's my review so far:

On Monday 13 June 2011 14:15:04 Yu, Ke wrote:
> --- /dev/null
> +++ b/scripts/combo-layer-hook-default.sh
> @@ -0,0 +1,14 @@
> +#!/bin/sh
> +# Take a patch from bitbake and apply to poky

This text should be a bit more generic. Maybe "Hook to add source 
component/revision info to commit message"

> --- /dev/null
> +++ b/scripts/combo-layer.conf.example
> @@ -0,0 +1,38 @@
> +# repo name

This should be "component name"

> +# leave it empty if no commit updated yet, and then the tool
> +# will start from the first commit

Change this to "If empty, the tool will start from the first commit"

> +# hook: if provided, the tool will call the hook to proceed the generated
> patch from upstream, 

proceed -> process

> --- /dev/null
> +++ b/scripts/combo-layer.py

Remove the .py extension from the script name, to match our other scripts. 
(The hook script extension can stay however, it's not meant to be executed 
directly.)

> +        # Step 2: generate the patch list stored in patch dir
> +        if dest_dir != ".":
> +            prefix = "--src-prefix=a/%s/ --dst-prefix=b/%s/" % (dest_dir,
> dest_dir) +        else:
> +            prefix = ""
> +        if repo['last_revision'] == "":
> +            logger.info("Warning: last_revision of repo %s is not set, so
> start from the first commit" % name) +            patch_cmd_range =
> "--root master"
> +            rev_cmd_range = "master"
> +        else:
> +            patch_cmd_range = "master"
> +            rev_cmd_range = "%s..master" % repo['last_revision']

I tested the tool by checking out an older revision of poky, and setting up 
components for oe-core and bitbake in the config file with last_revisions based 
on the most recent revisions merged into in my older poky checkout. After 
running init then update, no changes were applied. Once I changed the "else:" 
part of the above code to make patch_cmd_range = rev_cmd_range instead of 
"master" the update process worked.

I haven't yet tested the filtering or splitpatch but I will do so and let you 
know the results.

Some other suggestions:
* During update, print out which component it is updating from as it goes 
through them (in case the operation fails)
* The tool should clean up the temporary patch subdirectory after finishing

Cheers,
Paul
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the Openembedded-core mailing list