summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch/git.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch/git.py')
-rw-r--r--bitbake/lib/bb/fetch/git.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch/git.py b/bitbake/lib/bb/fetch/git.py
index 9bd447ff8b..57d758dcda 100644
--- a/bitbake/lib/bb/fetch/git.py
+++ b/bitbake/lib/bb/fetch/git.py
@@ -25,6 +25,7 @@ import bb
25from bb import data 25from bb import data
26from bb.fetch import Fetch 26from bb.fetch import Fetch
27from bb.fetch import runfetchcmd 27from bb.fetch import runfetchcmd
28from bb.fetch import logger
28 29
29class Git(Fetch): 30class Git(Fetch):
30 """Class to fetch a module or modules from git repositories""" 31 """Class to fetch a module or modules from git repositories"""
@@ -153,7 +154,7 @@ class Git(Fetch):
153 os.chdir(ud.clonedir) 154 os.chdir(ud.clonedir)
154 mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) 155 mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True)
155 if mirror_tarballs != "0" or 'fullclone' in ud.parm: 156 if mirror_tarballs != "0" or 'fullclone' in ud.parm:
156 bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git repository") 157 logger.info("Creating tarball of git repository")
157 runfetchcmd("tar -czf %s %s" % (repofile, os.path.join(".", ".git", "*") ), d) 158 runfetchcmd("tar -czf %s %s" % (repofile, os.path.join(".", ".git", "*") ), d)
158 159
159 if 'fullclone' in ud.parm: 160 if 'fullclone' in ud.parm:
@@ -185,7 +186,7 @@ class Git(Fetch):
185 runfetchcmd("%s checkout-index -q -f --prefix=%s -a" % (ud.basecmd, coprefix), d) 186 runfetchcmd("%s checkout-index -q -f --prefix=%s -a" % (ud.basecmd, coprefix), d)
186 187
187 os.chdir(codir) 188 os.chdir(codir)
188 bb.msg.note(1, bb.msg.domain.Fetcher, "Creating tarball of git checkout") 189 logger.info("Creating tarball of git checkout")
189 runfetchcmd("tar -czf %s %s" % (ud.localpath, os.path.join(".", "*") ), d) 190 runfetchcmd("tar -czf %s %s" % (ud.localpath, os.path.join(".", "*") ), d)
190 191
191 os.chdir(ud.clonedir) 192 os.chdir(ud.clonedir)
@@ -238,7 +239,7 @@ class Git(Fetch):
238 print("no repo") 239 print("no repo")
239 self.go(None, ud, d) 240 self.go(None, ud, d)
240 if not os.path.exists(ud.clonedir): 241 if not os.path.exists(ud.clonedir):
241 bb.msg.error(bb.msg.domain.Fetcher, "GIT repository for %s doesn't exist in %s, cannot get sortable buildnumber, using old value" % (url, ud.clonedir)) 242 logger.error("GIT repository for %s doesn't exist in %s, cannot get sortable buildnumber, using old value", url, ud.clonedir)
242 return None 243 return None
243 244
244 245
@@ -250,5 +251,5 @@ class Git(Fetch):
250 os.chdir(cwd) 251 os.chdir(cwd)
251 252
252 buildindex = "%s" % output.split()[0] 253 buildindex = "%s" % output.split()[0]
253 bb.msg.debug(1, bb.msg.domain.Fetcher, "GIT repository for %s in %s is returning %s revisions in rev-list before %s" % (url, ud.clonedir, buildindex, rev)) 254 logger.debug(1, "GIT repository for %s in %s is returning %s revisions in rev-list before %s", url, ud.clonedir, buildindex, rev)
254 return buildindex 255 return buildindex