summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorOla Redell <ola.redell@retotech.se>2017-01-12 11:33:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-17 11:29:29 +0000
commitd937b5f5e7f334e900aece53fb2eacffe30bc086 (patch)
tree6ed297aa026198f43aeb6443386977b23faef8e7 /bitbake/lib/bb/fetch2
parent7eb02e837ed253a2ae69023595c25660b4d56b7c (diff)
downloadpoky-d937b5f5e7f334e900aece53fb2eacffe30bc086.tar.gz
bitbake: gitsm.py: Add force flag to git checkout command in update_submodules
When the gitsm fetcher is used with a repo that includes a .gitattributes file that makes git modify files on cloning (e.g. line break characters), the subsequent checkout performed in the update_submodules function fails. This is fixed by adding the force flag (-f) to the checkout command. (Bitbake rev: c05e1396625b14e66d795408ea2ae4cd2afc3209) Signed-off-by: Ola Redell <ola.redell@retotech.se> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/gitsm.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index 6613762048..939fb3f09f 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -108,7 +108,7 @@ class GitSM(Git):
108 os.rename(ud.clonedir, gitdir) 108 os.rename(ud.clonedir, gitdir)
109 runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*true/bare = false/'", d) 109 runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*true/bare = false/'", d)
110 runfetchcmd(ud.basecmd + " reset --hard", d, workdir=tmpclonedir) 110 runfetchcmd(ud.basecmd + " reset --hard", d, workdir=tmpclonedir)
111 runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d, workdir=tmpclonedir) 111 runfetchcmd(ud.basecmd + " checkout -f " + ud.revisions[ud.names[0]], d, workdir=tmpclonedir)
112 runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=tmpclonedir) 112 runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=tmpclonedir)
113 self._set_relative_paths(tmpclonedir) 113 self._set_relative_paths(tmpclonedir)
114 runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*false/bare = true/'", d, workdir=tmpclonedir) 114 runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*false/bare = true/'", d, workdir=tmpclonedir)