Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Paul Eggleton <paul.eggleton@intel.com>
To: "openembedded-core" <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] RFC - combo layer repo tool
Date: Fri, 17 Jun 2011 18:42:49 +0100	[thread overview]
Message-ID: <201106171842.49291.paul.eggleton@intel.com> (raw)
In-Reply-To: <33AB447FBD802F4E932063B962385B3554AE4989@shsmsx501.ccr.corp.intel.com>

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.




  parent reply	other threads:[~2011-06-17 17:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 13:15 [PATCH] RFC - combo layer repo tool Yu, Ke
2011-06-13 15:33 ` Otavio Salvador
2011-06-13 15:47   ` Koen Kooi
2011-06-13 18:15     ` Bruce Ashfield
2011-06-13 16:00   ` Paul Eggleton
2011-06-13 16:37     ` Otavio Salvador
2011-06-14  1:49       ` Yu Ke
2011-06-17 17:42 ` Paul Eggleton [this message]
2011-06-18 22:47   ` Chris Larson
2011-06-22 13:10     ` Yu Ke

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201106171842.49291.paul.eggleton@intel.com \
    --to=paul.eggleton@intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox