summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/fetch2/git.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index ec20d262a8..ba8126f003 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -127,8 +127,12 @@ class Git(Fetch):
127 needupdate = True 127 needupdate = True
128 if needupdate: 128 if needupdate:
129 bb.fetch2.check_network_access(d, "git fetch %s%s" % (ud.host, ud.path)) 129 bb.fetch2.check_network_access(d, "git fetch %s%s" % (ud.host, ud.path))
130 runfetchcmd("%s remote prune origin" % ud.basecmd, d) 130 try:
131 runfetchcmd("%s remote rm origin" % ud.basecmd, d) 131 runfetchcmd("%s remote prune origin" % ud.basecmd, d)
132 runfetchcmd("%s remote rm origin" % ud.basecmd, d)
133 except bb.fetch2.FetchError:
134 logger.debug(1, "No Origin")
135
132 runfetchcmd("%s remote add origin %s://%s%s%s" % (ud.basecmd, ud.proto, username, ud.host, ud.path), d) 136 runfetchcmd("%s remote add origin %s://%s%s%s" % (ud.basecmd, ud.proto, username, ud.host, ud.path), d)
133 runfetchcmd("%s fetch --all -t" % ud.basecmd, d) 137 runfetchcmd("%s fetch --all -t" % ud.basecmd, d)
134 runfetchcmd("%s prune-packed" % ud.basecmd, d) 138 runfetchcmd("%s prune-packed" % ud.basecmd, d)