summaryrefslogtreecommitdiff
path: root/yocto-poky/bitbake/lib/bb/fetch2/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'yocto-poky/bitbake/lib/bb/fetch2/git.py')
-rw-r--r--yocto-poky/bitbake/lib/bb/fetch2/git.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/yocto-poky/bitbake/lib/bb/fetch2/git.py b/yocto-poky/bitbake/lib/bb/fetch2/git.py
index 9bd87ad25..526668bc2 100644
--- a/yocto-poky/bitbake/lib/bb/fetch2/git.py
+++ b/yocto-poky/bitbake/lib/bb/fetch2/git.py
@@ -70,6 +70,7 @@ import errno
import os
import re
import bb
+import errno
from bb import data
from bb.fetch2 import FetchMethod
from bb.fetch2 import runfetchcmd
@@ -261,23 +262,7 @@ class Git(FetchMethod):
if ud.bareclone:
cloneflags += " --mirror"
- # Versions of git prior to 1.7.9.2 have issues where foo.git and foo get confused
- # and you end up with some horrible union of the two when you attempt to clone it
- # The least invasive workaround seems to be a symlink to the real directory to
- # fool git into ignoring any .git version that may also be present.
- #
- # The issue is fixed in more recent versions of git so we can drop this hack in future
- # when that version becomes common enough.
- clonedir = ud.clonedir
- if not ud.path.endswith(".git"):
- indirectiondir = destdir[:-1] + ".indirectionsymlink"
- if os.path.exists(indirectiondir):
- os.remove(indirectiondir)
- bb.utils.mkdirhier(os.path.dirname(indirectiondir))
- os.symlink(ud.clonedir, indirectiondir)
- clonedir = indirectiondir
-
- runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, clonedir, destdir), d)
+ runfetchcmd("%s clone %s %s/ %s" % (ud.basecmd, cloneflags, ud.clonedir, destdir), d)
os.chdir(destdir)
repourl = self._get_repo_url(ud)
runfetchcmd("%s remote set-url origin %s" % (ud.basecmd, repourl), d)
@@ -379,7 +364,7 @@ class Git(FetchMethod):
"""
pupver = ('', '')
- tagregex = re.compile(d.getVar('GITTAGREGEX', True) or "(?P<pver>([0-9][\.|_]?)+)")
+ tagregex = re.compile(d.getVar('UPSTREAM_CHECK_GITTAGREGEX', True) or "(?P<pver>([0-9][\.|_]?)+)")
try:
output = self._lsremote(ud, d, "refs/tags/*")
except bb.fetch2.FetchError or bb.fetch2.NetworkAccess: