From 1083d90888589b9f0d50a1d480f7c774d8b4bda3 Mon Sep 17 00:00:00 2001 From: Andre Rosa Date: Fri, 3 Nov 2017 12:40:44 +0100 Subject: bitbake: 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 (Bitbake rev: 62a53e9dbb6dc7489e44c32340b0caddd4596f0a) Signed-off-by: Andre Rosa Signed-off-by: Martin Jansa Signed-off-by: Richard Purdie (cherry picked from commit 2ab50074c1a6c56a8a178755de108447d7b7acaf) Signed-off-by: Javier Viguera Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch2/git.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 526668bc23..c226887a74 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -274,7 +274,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) - 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) else: runfetchcmd("%s checkout %s" % (ud.basecmd, ud.revisions[ud.names[0]]), d) -- cgit v1.2.3-54-g00ecf