[gnome-continuous-yocto/gnomeostree-3.28-rocko: 4042/8267] bitbake: gitsm.py: Add force flag to git checkout command in update_submodules
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous-yocto/gnomeostree-3.28-rocko: 4042/8267] bitbake: gitsm.py: Add force flag to git checkout command in update_submodules
- Date: Sun, 17 Dec 2017 01:28:52 +0000 (UTC)
commit d937b5f5e7f334e900aece53fb2eacffe30bc086
Author: Ola Redell <ola redell retotech se>
Date: Thu Jan 12 11:33:27 2017 +0100
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>
bitbake/lib/bb/fetch2/gitsm.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/bitbake/lib/bb/fetch2/gitsm.py b/bitbake/lib/bb/fetch2/gitsm.py
index 6613762..939fb3f 100644
--- a/bitbake/lib/bb/fetch2/gitsm.py
+++ b/bitbake/lib/bb/fetch2/gitsm.py
@@ -108,7 +108,7 @@ class GitSM(Git):
os.rename(ud.clonedir, gitdir)
runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*true/bare = false/'", d)
runfetchcmd(ud.basecmd + " reset --hard", d, workdir=tmpclonedir)
- runfetchcmd(ud.basecmd + " checkout " + ud.revisions[ud.names[0]], d, workdir=tmpclonedir)
+ runfetchcmd(ud.basecmd + " checkout -f " + ud.revisions[ud.names[0]], d, workdir=tmpclonedir)
runfetchcmd(ud.basecmd + " submodule update --init --recursive", d, workdir=tmpclonedir)
self._set_relative_paths(tmpclonedir)
runfetchcmd("sed " + gitdir + "/config -i -e 's/bare.*=.*false/bare = true/'", d,
workdir=tmpclonedir)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]