All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] fetcher2 git cleanup
@ 2011-05-27  8:53 Yu Ke
  2011-05-27  8:53 ` [PATCH 1/4] fetche2 git: change default protocol from rsync to git Yu Ke
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Yu Ke @ 2011-05-27  8:53 UTC (permalink / raw)
  To: poky, richard.purdie; +Cc: Darren Hart

This patch series is some clean up of the git fetcher according to the comment
from mailing list.

The following changes since commit 9bccbc5fbc71b331911b558a2ba15e0a6d0046b4:
  Nitin A Kamble (1):
        tcmode-default: workaround for gcc 4.6.0 failure on beagleboard

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib kyu3/git-cleanup
  http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=kyu3/git-cleanup

Yu Ke (4):
  fetche2 git: change default protocol from rsync to git
  fetcher2 git: unify the nocheckout option format
  fetcher2/git: add document for git fetcher supported options
  fetch2 git: enhance the unpack by using "git checkout"

 bitbake/lib/bb/fetch2/git.py |   51 ++++++++++++++++++++++++++++++++++-------
 1 files changed, 42 insertions(+), 9 deletions(-)



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/4] fetche2 git: change default protocol from rsync to git
  2011-05-27  8:53 [PATCH 0/4] fetcher2 git cleanup Yu Ke
@ 2011-05-27  8:53 ` Yu Ke
  2011-05-27  8:53 ` [PATCH 2/4] fetcher2 git: unify the nocheckout option format Yu Ke
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Yu Ke @ 2011-05-27  8:53 UTC (permalink / raw)
  To: poky, richard.purdie

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 bitbake/lib/bb/fetch2/git.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 82721c6..12dabe3 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -51,7 +51,7 @@ class Git(FetchMethod):
         elif not ud.host:
             ud.proto = 'file'
         else:
-            ud.proto = "rsync"
+            ud.proto = "git"
 
         ud.nocheckout = False
         if 'nocheckout' in ud.parm:
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/4] fetcher2 git: unify the nocheckout option format
  2011-05-27  8:53 [PATCH 0/4] fetcher2 git cleanup Yu Ke
  2011-05-27  8:53 ` [PATCH 1/4] fetche2 git: change default protocol from rsync to git Yu Ke
@ 2011-05-27  8:53 ` Yu Ke
  2011-05-27  8:53 ` [PATCH 3/4] fetcher2/git: add document for git fetcher supported options Yu Ke
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Yu Ke @ 2011-05-27  8:53 UTC (permalink / raw)
  To: poky, richard.purdie

make the nocheckout option format to be: default is "0",
use nocheckou=1 to set this option

with this patch, the format will be consistant with other bitbake options
like rebaseable

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 bitbake/lib/bb/fetch2/git.py |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 12dabe3..a05402a 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -53,9 +53,7 @@ class Git(FetchMethod):
         else:
             ud.proto = "git"
 
-        ud.nocheckout = False
-        if 'nocheckout' in ud.parm:
-            ud.nocheckout = True
+        ud.nocheckout = ud.parm.get("nocheckout","0") == "1"
 
         # rebaseable means the upstream git repo may rebase in the future,
         # and current revision may disappear from upstream repo
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/4] fetcher2/git: add document for git fetcher supported options
  2011-05-27  8:53 [PATCH 0/4] fetcher2 git cleanup Yu Ke
  2011-05-27  8:53 ` [PATCH 1/4] fetche2 git: change default protocol from rsync to git Yu Ke
  2011-05-27  8:53 ` [PATCH 2/4] fetcher2 git: unify the nocheckout option format Yu Ke
@ 2011-05-27  8:53 ` Yu Ke
  2011-05-27  8:53 ` [PATCH 4/4] fetch2 git: enhance the unpack by using "git checkout" Yu Ke
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Yu Ke @ 2011-05-27  8:53 UTC (permalink / raw)
  To: poky, richard.purdie

CC: Khem Raj <raj.khem@gmail.com>
CC: Darren Hart <dvhart@linux.intel.com>

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 bitbake/lib/bb/fetch2/git.py |   38 +++++++++++++++++++++++++++++++++++---
 1 files changed, 35 insertions(+), 3 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index a05402a..3b8965e 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -3,6 +3,41 @@
 """
 BitBake 'Fetch' git implementation
 
+git fetcher support the SRC_URI with format of:
+SRC_URI = "git://some.host/somepath;OptionA=xxx;OptionB=xxx;..."
+
+Supported SRC_URI options are:
+
+- branch
+   The git branch to retrieve from. The default is "master"
+
+   this option also support multiple branches fetching, branches
+   are seperated by comma. in multiple branches case, the name option
+   must have the same number of names to match the branches, which is
+   used to specify the SRC_REV for the branch
+   e.g:
+   SRC_URI="git://some.host/somepath;branch=branchX,branchY;name=nameX,nameY"
+   SRCREV_nameX = "xxxxxxxxxxxxxxxxxxxx"
+   SRCREV_nameY = "YYYYYYYYYYYYYYYYYYYY"
+
+- tag
+    The git tag to retrieve. The default is "master"
+
+- protocol
+   The method to use to access the repository. Common options are "git",
+   "http", "file" and "rsync". The default is "git"
+
+- rebaseable
+   rebaseable indicates that the upstream git repo may rebase in the future,
+   and current revision may disappear from upstream repo. This option will
+   reminder fetcher to preserve local cache carefully for future use.
+   The default value is "0", set rebaseable=1 for rebaseable git repo
+
+- nocheckout
+   Don't checkout source code when unpacking. set this option for the recipe
+   who has its own routine to checkout code.
+   The default is "0", set nocheckout=1 if needed.
+
 """
 
 #Copyright (C) 2005 Richard Purdie
@@ -55,9 +90,6 @@ class Git(FetchMethod):
 
         ud.nocheckout = ud.parm.get("nocheckout","0") == "1"
 
-        # rebaseable means the upstream git repo may rebase in the future,
-        # and current revision may disappear from upstream repo
-        # rebaseable is false by default. set rebaseable=1 in SRC_URI if rebaseable.
         ud.rebaseable = ud.parm.get("rebaseable","0") == "1"
 
         branches = ud.parm.get("branch", "master").split(',')
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 4/4] fetch2 git: enhance the unpack by using "git checkout"
  2011-05-27  8:53 [PATCH 0/4] fetcher2 git cleanup Yu Ke
                   ` (2 preceding siblings ...)
  2011-05-27  8:53 ` [PATCH 3/4] fetcher2/git: add document for git fetcher supported options Yu Ke
@ 2011-05-27  8:53 ` Yu Ke
  2011-05-27 17:12 ` [PATCH 0/4] fetcher2 git cleanup Khem Raj
  2011-05-27 17:12 ` Richard Purdie
  5 siblings, 0 replies; 8+ messages in thread
From: Yu Ke @ 2011-05-27  8:53 UTC (permalink / raw)
  To: poky, richard.purdie

current git fetcher unpack method only checkout index and working tree,
but did not did not update the git branch in ref/heads, so user may not
get right info in ${S} by using git.

this patch enhance the unpack by using git checkout to fix this issue.

Fix bug [YOCTO #1089]

Signed-off-by: Yu Ke <ke.yu@intel.com>
---
 bitbake/lib/bb/fetch2/git.py |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 3b8965e..ae44a49 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -213,8 +213,11 @@ class Git(FetchMethod):
         runfetchcmd("git clone -s -n %s %s" % (ud.clonedir, destdir), d)
         if not ud.nocheckout:
             os.chdir(destdir)
-            runfetchcmd("%s read-tree %s%s" % (ud.basecmd, ud.revisions[ud.names[0]], readpathspec), d)
-            runfetchcmd("%s checkout-index -q -f -a" % ud.basecmd, d)
+            if subdir != "":
+                runfetchcmd("%s read-tree %s%s" % (ud.basecmd, ud.revisions[ud.names[0]], readpathspec), d)
+                runfetchcmd("%s checkout-index -q -f -a" % ud.basecmd, d)
+            else:
+                runfetchcmd("%s checkout %s" % (ud.basecmd, ud.revisions[ud.names[0]]), d)
         return True
 
     def clean(self, ud, d):
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/4] fetcher2 git cleanup
  2011-05-27  8:53 [PATCH 0/4] fetcher2 git cleanup Yu Ke
                   ` (3 preceding siblings ...)
  2011-05-27  8:53 ` [PATCH 4/4] fetch2 git: enhance the unpack by using "git checkout" Yu Ke
@ 2011-05-27 17:12 ` Khem Raj
  2011-05-28  1:40   ` Yu Ke
  2011-05-27 17:12 ` Richard Purdie
  5 siblings, 1 reply; 8+ messages in thread
From: Khem Raj @ 2011-05-27 17:12 UTC (permalink / raw)
  To: Yu Ke; +Cc: Darren Hart, poky

On Fri, May 27, 2011 at 1:53 AM, Yu Ke <ke.yu@intel.com> wrote:
> This patch series is some clean up of the git fetcher according to the comment
> from mailing list.
>
> The following changes since commit 9bccbc5fbc71b331911b558a2ba15e0a6d0046b4:
>  Nitin A Kamble (1):
>        tcmode-default: workaround for gcc 4.6.0 failure on beagleboard
>
> are available in the git repository at:
>
>  git://git.pokylinux.org/poky-contrib kyu3/git-cleanup
>  http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=kyu3/git-cleanup
>
> Yu Ke (4):
>  fetche2 git: change default protocol from rsync to git
>  fetcher2 git: unify the nocheckout option format

above patch has typo in commit message nocheckou is missing 't'

>  fetcher2/git: add document for git fetcher supported options

while the contents are ok there are grammatical corrections needed in the above

>  fetch2 git: enhance the unpack by using "git checkout"
>
>  bitbake/lib/bb/fetch2/git.py |   51 ++++++++++++++++++++++++++++++++++-------
>  1 files changed, 42 insertions(+), 9 deletions(-)
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/4] fetcher2 git cleanup
  2011-05-27  8:53 [PATCH 0/4] fetcher2 git cleanup Yu Ke
                   ` (4 preceding siblings ...)
  2011-05-27 17:12 ` [PATCH 0/4] fetcher2 git cleanup Khem Raj
@ 2011-05-27 17:12 ` Richard Purdie
  5 siblings, 0 replies; 8+ messages in thread
From: Richard Purdie @ 2011-05-27 17:12 UTC (permalink / raw)
  To: Yu Ke; +Cc: Darren Hart, poky

On Fri, 2011-05-27 at 16:53 +0800, Yu Ke wrote:
> This patch series is some clean up of the git fetcher according to the comment
> from mailing list.
> 
> The following changes since commit 9bccbc5fbc71b331911b558a2ba15e0a6d0046b4:
>   Nitin A Kamble (1):
>         tcmode-default: workaround for gcc 4.6.0 failure on beagleboard
> 
> are available in the git repository at:
> 
>   git://git.pokylinux.org/poky-contrib kyu3/git-cleanup
>   http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=kyu3/git-cleanup
> 
> Yu Ke (4):
>   fetche2 git: change default protocol from rsync to git
>   fetcher2 git: unify the nocheckout option format
>   fetcher2/git: add document for git fetcher supported options
>   fetch2 git: enhance the unpack by using "git checkout"
> 
>  bitbake/lib/bb/fetch2/git.py |   51 ++++++++++++++++++++++++++++++++++-------
>  1 files changed, 42 insertions(+), 9 deletions(-)

Merged to bitbake upstream. In future could you keep the commit message
summary prefixes consistent please :)

Cheers,

Richard




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/4] fetcher2 git cleanup
  2011-05-27 17:12 ` [PATCH 0/4] fetcher2 git cleanup Khem Raj
@ 2011-05-28  1:40   ` Yu Ke
  0 siblings, 0 replies; 8+ messages in thread
From: Yu Ke @ 2011-05-28  1:40 UTC (permalink / raw)
  To: Khem Raj; +Cc: Richard Purdie, poky

on 2011-5-28 1:12, Khem Raj wrote:
> On Fri, May 27, 2011 at 1:53 AM, Yu Ke<ke.yu@intel.com>  wrote:
>> This patch series is some clean up of the git fetcher according to the comment
>> from mailing list.
>>
>> The following changes since commit 9bccbc5fbc71b331911b558a2ba15e0a6d0046b4:
>>   Nitin A Kamble (1):
>>         tcmode-default: workaround for gcc 4.6.0 failure on beagleboard
>>
>> are available in the git repository at:
>>
>>   git://git.pokylinux.org/poky-contrib kyu3/git-cleanup
>>   http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=kyu3/git-cleanup
>>
>> Yu Ke (4):
>>   fetche2 git: change default protocol from rsync to git
>>   fetcher2 git: unify the nocheckout option format
>
> above patch has typo in commit message nocheckou is missing 't'
>
>>   fetcher2/git: add document for git fetcher supported options
>
> while the contents are ok there are grammatical corrections needed in the above

It is good reminder. Thank Khem and Richard. I will take care of it next 
time.

Regards
Ke


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-05-28  1:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-27  8:53 [PATCH 0/4] fetcher2 git cleanup Yu Ke
2011-05-27  8:53 ` [PATCH 1/4] fetche2 git: change default protocol from rsync to git Yu Ke
2011-05-27  8:53 ` [PATCH 2/4] fetcher2 git: unify the nocheckout option format Yu Ke
2011-05-27  8:53 ` [PATCH 3/4] fetcher2/git: add document for git fetcher supported options Yu Ke
2011-05-27  8:53 ` [PATCH 4/4] fetch2 git: enhance the unpack by using "git checkout" Yu Ke
2011-05-27 17:12 ` [PATCH 0/4] fetcher2 git cleanup Khem Raj
2011-05-28  1:40   ` Yu Ke
2011-05-27 17:12 ` Richard Purdie

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.