fetcher2 git cleanup
cover fetcher2 git cleanup
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(-)
PATCH 1/4 fetche2 git: change default protocol from rsync to git
--- bitbake/lib/bb/fetch2/git.py | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
bitbake/lib/bb/fetch2/git.py +1 -1
@@ -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:
Signature · 1 line
1.7.0.4
PATCH 2/4 fetcher2 git: unify the nocheckout option format
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
--- bitbake/lib/bb/fetch2/git.py | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-)
bitbake/lib/bb/fetch2/git.py +1 -3
@@ -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
Signature · 1 line
1.7.0.4
PATCH 3/4 fetcher2/git: add document for git fetcher supported options
In reply to Yu Ke--- bitbake/lib/bb/fetch2/git.py | 38 +++++++++++++++++++++++++++++++++++--- 1 files changed, 35 insertions(+), 3 deletions(-)
bitbake/lib/bb/fetch2/git.py +35 -3
@@ -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(',')
Signature · 1 line
1.7.0.4
PATCH 4/4 fetch2 git: enhance the unpack by using "git checkout"
In reply to Yu Kecurrent 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]
--- bitbake/lib/bb/fetch2/git.py | 7 +++++-- 1 files changed, 5 insertions(+), 2 deletions(-)
bitbake/lib/bb/fetch2/git.py +5 -2
@@ -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):
Signature · 1 line
1.7.0.4
Quoted 7 lines · Yu Ke
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
Quoted 8 lines
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-cleanupYu 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'
Quoted 1 line
fetcher2/git: add document for git fetcher supported options
while the contents are ok there are grammatical corrections needed in the above
Quoted 6 lines
fetch2 git: enhance the unpack by using "git checkout"
bitbake/lib/bb/fetch2/git.py | 51 ++++++++++++++++++++++++++++++++++-------
1 files changed, 42 insertions(+), 9 deletions(-)
Quoted 17 lines · Khem Raj
Quoted 7 lines · Yu Ke
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 beagleboardQuoted 8 lines
are available in the git repository at:
git://git.pokylinux.org/poky-contribkyu3/git-cleanup
http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=kyu3/git-cleanupYu Ke (4):
fetche2 git: change default protocol from rsync to git fetcher2 git: unify the nocheckout option format
Quoted 5 lines
above patch has typo in commit message nocheckou is missing 't'
Quoted 1 line
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
Richard Purdie
AppliedQuoted 12 lines · Yu Ke
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 beagleboardare available in the git repository at:
git://git.pokylinux.org/poky-contribkyu3/git-cleanup
http://git.pokylinux.org/cgit/cgit.cgi/poky-contrib/log/?h=kyu3/git-cleanup
Quoted 8 lines
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