summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Rosa <andre.rosa@lge.com>2017-09-07 11:15:55 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-09-07 11:47:29 +0100
commit2ab50074c1a6c56a8a178755de108447d7b7acaf (patch)
treebc4b843f2424c3c2e9f222d90e9d7a937f4d09bb
parent1ca2eec459424892391f060442ef38cf28d6a54a (diff)
downloadbitbake-contrib-2ab50074c1a6c56a8a178755de108447d7b7acaf.zip
bitbake-contrib-2ab50074c1a6c56a8a178755de108447d7b7acaf.tar.gz
bitbake-contrib-2ab50074c1a6c56a8a178755de108447d7b7acaf.tar.bz2
Replace deprecated git branch parameter "--set-upstream"
Since 2017-08-17 (git version 2.14.1.473.g3ec7d702a) using deprecated git branch parameter "--set-upstream" causes a fetcher error. Replace it by "--set-upstream-to". https://git.kernel.org/pub/scm/git/git.git/commit/?id=52668846ea2d41ffbd87cda7cb8e492dea9f2c4d says, it's deprecated since 2012-08-30 so hopefully all still supported host distributions have new enough git to support "--set-upstream-to". ERROR: PACKAGE do_unpack: Fetcher failure: ...; git -c core.fsyncobjectfiles=0 branch --set-upstream master origin/master failed with exit code 128, output: fatal: the '--set-upstream' option is no longer supported. Please use '--track' or '--set-upstream-to' instead. ERROR: PACKAGE do_unpack: Function failed: base_do_unpack Signed-off-by: Andre Rosa <andre.rosa@lge.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--lib/bb/fetch2/git.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 534c93d..5ef8cd6 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -485,7 +485,7 @@ class Git(FetchMethod):
branchname = ud.branches[ud.names[0]]
runfetchcmd("%s checkout -B %s %s" % (ud.basecmd, branchname, \
ud.revisions[ud.names[0]]), d, workdir=destdir)
- runfetchcmd("%s branch --set-upstream %s origin/%s" % (ud.basecmd, branchname, \
+ runfetchcmd("%s branch %s --set-upstream-to origin/%s" % (ud.basecmd, branchname, \
branchname), d, workdir=destdir)
else:
runfetchcmd("%s checkout %s" % (ud.basecmd, ud.revisions[ud.names[0]]), d, workdir=destdir)