All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] git fetcher: add doc for supported options
@ 2011-05-24  6:58 Yu Ke
  2011-05-24  6:58 ` [PATCH 1/1] fetcher2/git: add document for git fetcher " Yu Ke
  0 siblings, 1 reply; 6+ messages in thread
From: Yu Ke @ 2011-05-24  6:58 UTC (permalink / raw)
  To: poky; +Cc: Darren Hart

The following changes since commit 3504c3a9b1af5a3405e0a03a5ade50b82535b6dd:
  Scott Rifenbark (1):
        documentation/yocto-project-qs/yocto-project-qs.xml: fixed build env script

are available in the git repository at:

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

Yu Ke (1):
  fetcher2/git: add document for git fetcher supported options

 bitbake/lib/bb/fetch2/git.py |   37 ++++++++++++++++++++++++++++++++++---
 1 files changed, 34 insertions(+), 3 deletions(-)



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

* [PATCH 1/1] fetcher2/git: add document for git fetcher supported options
  2011-05-24  6:58 [PATCH 0/1] git fetcher: add doc for supported options Yu Ke
@ 2011-05-24  6:58 ` Yu Ke
  2011-05-24  7:43   ` Koen Kooi
  2011-05-24 17:17   ` Khem Raj
  0 siblings, 2 replies; 6+ messages in thread
From: Yu Ke @ 2011-05-24  6:58 UTC (permalink / raw)
  To: poky

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 |   37 ++++++++++++++++++++++++++++++++++---
 1 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index 82721c6..b07298d 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -3,6 +3,40 @@
 """
 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 "rsync"
+
+- 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 false
+
 """
 
 #Copyright (C) 2005 Richard Purdie
@@ -57,9 +91,6 @@ class Git(FetchMethod):
         if 'nocheckout' in ud.parm:
             ud.nocheckout = True
 
-        # 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] 6+ messages in thread

* Re: [PATCH 1/1] fetcher2/git: add document for git fetcher supported options
  2011-05-24  6:58 ` [PATCH 1/1] fetcher2/git: add document for git fetcher " Yu Ke
@ 2011-05-24  7:43   ` Koen Kooi
  2011-05-24  7:54     ` Yu Ke
  2011-05-24 17:17   ` Khem Raj
  1 sibling, 1 reply; 6+ messages in thread
From: Koen Kooi @ 2011-05-24  7:43 UTC (permalink / raw)
  To: Yu Ke; +Cc: poky


Op 24 mei 2011, om 08:58 heeft Yu Ke het volgende geschreven:

> 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 |   37 ++++++++++++++++++++++++++++++++++---
> 1 files changed, 34 insertions(+), 3 deletions(-)
> protocol
> +   The method to use to access the repository. Common options are "git",
> +   "http", "file" and "rsync". The default is "rsync"

In this day and age shouldn't we change the default to 'git'?

regards,

Koen


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

* Re: [PATCH 1/1] fetcher2/git: add document for git fetcher supported options
  2011-05-24  7:43   ` Koen Kooi
@ 2011-05-24  7:54     ` Yu Ke
  0 siblings, 0 replies; 6+ messages in thread
From: Yu Ke @ 2011-05-24  7:54 UTC (permalink / raw)
  To: Koen Kooi; +Cc: poky

on 2011-5-24 15:43, Koen Kooi wrote:
> In this day and age shouldn't we change the default to 'git'?

Yup, it make sense. let me work out another patch to change the default 
protocol to git.

Regards
Ke


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

* Re: [PATCH 1/1] fetcher2/git: add document for git fetcher supported options
  2011-05-24  6:58 ` [PATCH 1/1] fetcher2/git: add document for git fetcher " Yu Ke
  2011-05-24  7:43   ` Koen Kooi
@ 2011-05-24 17:17   ` Khem Raj
  2011-05-25  2:15     ` Yu Ke
  1 sibling, 1 reply; 6+ messages in thread
From: Khem Raj @ 2011-05-24 17:17 UTC (permalink / raw)
  To: Yu Ke; +Cc: poky

On (24/05/11 14:58), Yu Ke wrote:
> 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 |   37 ++++++++++++++++++++++++++++++++++---
>  1 files changed, 34 insertions(+), 3 deletions(-)
> 
> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
> index 82721c6..b07298d 100644
> --- a/bitbake/lib/bb/fetch2/git.py
> +++ b/bitbake/lib/bb/fetch2/git.py
> @@ -3,6 +3,40 @@
>  """
>  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 "rsync"
> +
> +- 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

for consistency why not make rebaseable=true/false as well ?

> +
> +- 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 false
                                                                ^^^^
may be it should be in '' or quotes



> +
>  """
>  
>  #Copyright (C) 2005 Richard Purdie
> @@ -57,9 +91,6 @@ class Git(FetchMethod):
>          if 'nocheckout' in ud.parm:
>              ud.nocheckout = True
>  
> -        # 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
> 
> _______________________________________________
> poky mailing list
> poky@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/poky

-- 
-Khem


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

* Re: [PATCH 1/1] fetcher2/git: add document for git fetcher supported options
  2011-05-24 17:17   ` Khem Raj
@ 2011-05-25  2:15     ` Yu Ke
  0 siblings, 0 replies; 6+ messages in thread
From: Yu Ke @ 2011-05-25  2:15 UTC (permalink / raw)
  To: poky

on 2011-5-25 1:17, Khem Raj wrote:
> On (24/05/11 14:58), Yu Ke wrote:
>> 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 |   37 ++++++++++++++++++++++++++++++++++---
>>   1 files changed, 34 insertions(+), 3 deletions(-)
>>
>> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
>> index 82721c6..b07298d 100644
>> --- a/bitbake/lib/bb/fetch2/git.py
>> +++ b/bitbake/lib/bb/fetch2/git.py
>> @@ -3,6 +3,40 @@
>>   """
>>   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 "rsync"
>> +
>> +- 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
>
> for consistency why not make rebaseable=true/false as well ?
>
>> +
>> +- 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 false
>                                                                  ^^^^
> may be it should be in '' or quotes

Good catch. my description is not 100% accurate here. Actually this 
parameter has no default value. According to the nocheckout handling code:
"
         ud.nocheckout = False
         if 'nocheckout' in ud.parm:
             ud.nocheckout = True
"
the value does not matter, what matters is that if the SRC_URI have this 
option set. In another word, "nocheckout=0" also lead to ud.nocheckout=True.

So I am thinking if it is better to make the nocheckout format the same 
as rebaseable, e.g.
"
	ud.nocheckout = ud.parm.get("nocheckout","0") == "1"
"
i.e. the default value is "0", and set nocheckout=1 for nocheckout 
recipe. In this case, we have consistency format. And this format also 
consist with other bitbake variable, for example, 
BB_GENERATE_MIRROR_TARBALLS. Also the current existing recipes are 
already using the "nocheckout=1" format, so this change require no 
recipe change.

Comments?

Regards
Ke


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

end of thread, other threads:[~2011-05-25  2:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24  6:58 [PATCH 0/1] git fetcher: add doc for supported options Yu Ke
2011-05-24  6:58 ` [PATCH 1/1] fetcher2/git: add document for git fetcher " Yu Ke
2011-05-24  7:43   ` Koen Kooi
2011-05-24  7:54     ` Yu Ke
2011-05-24 17:17   ` Khem Raj
2011-05-25  2:15     ` Yu Ke

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.