summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2017-03-21 11:41:02 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-03-22 11:35:23 +0000
commit5ee3bae3bb7b80f79a84c2f0709b03f2291b6c54 (patch)
tree62e2287825ae9c67558f94c935205d827b96084f /bitbake/lib/bb/fetch2
parentb079a2da3635f45479c55c3282b51a654fdea9af (diff)
downloadpoky-5ee3bae3bb7b80f79a84c2f0709b03f2291b6c54.tar.gz
bitbake: fetch/git: kill pointless quotes around single % args
(Bitbake rev: 4aebf12153369364eae2e6e773e2a921e9c91f72) Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/git.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index bbd302ee78..e1e876535f 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -205,7 +205,7 @@ class Git(FetchMethod):
205 if ud.rebaseable: 205 if ud.rebaseable:
206 for name in ud.names: 206 for name in ud.names:
207 gitsrcname = gitsrcname + '_' + ud.revisions[name] 207 gitsrcname = gitsrcname + '_' + ud.revisions[name]
208 ud.mirrortarball = 'git2_%s.tar.gz' % (gitsrcname) 208 ud.mirrortarball = 'git2_%s.tar.gz' % gitsrcname
209 ud.fullmirror = os.path.join(d.getVar("DL_DIR"), ud.mirrortarball) 209 ud.fullmirror = os.path.join(d.getVar("DL_DIR"), ud.mirrortarball)
210 gitdir = d.getVar("GITDIR") or (d.getVar("DL_DIR") + "/git2/") 210 gitdir = d.getVar("GITDIR") or (d.getVar("DL_DIR") + "/git2/")
211 ud.clonedir = os.path.join(gitdir, gitsrcname) 211 ud.clonedir = os.path.join(gitdir, gitsrcname)
@@ -240,7 +240,7 @@ class Git(FetchMethod):
240 # If the checkout doesn't exist and the mirror tarball does, extract it 240 # If the checkout doesn't exist and the mirror tarball does, extract it
241 if not os.path.exists(ud.clonedir) and os.path.exists(ud.fullmirror): 241 if not os.path.exists(ud.clonedir) and os.path.exists(ud.fullmirror):
242 bb.utils.mkdirhier(ud.clonedir) 242 bb.utils.mkdirhier(ud.clonedir)
243 runfetchcmd("tar -xzf %s" % (ud.fullmirror), d, workdir=ud.clonedir) 243 runfetchcmd("tar -xzf %s" % ud.fullmirror, d, workdir=ud.clonedir)
244 244
245 repourl = self._get_repo_url(ud) 245 repourl = self._get_repo_url(ud)
246 246
@@ -292,14 +292,14 @@ class Git(FetchMethod):
292 292
293 logger.info("Creating tarball of git repository") 293 logger.info("Creating tarball of git repository")
294 runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d, workdir=ud.clonedir) 294 runfetchcmd("tar -czf %s %s" % (ud.fullmirror, os.path.join(".") ), d, workdir=ud.clonedir)
295 runfetchcmd("touch %s.done" % (ud.fullmirror), d, workdir=ud.clonedir) 295 runfetchcmd("touch %s.done" % ud.fullmirror, d, workdir=ud.clonedir)
296 296
297 def unpack(self, ud, destdir, d): 297 def unpack(self, ud, destdir, d):
298 """ unpack the downloaded src to destdir""" 298 """ unpack the downloaded src to destdir"""
299 299
300 subdir = ud.parm.get("subpath", "") 300 subdir = ud.parm.get("subpath", "")
301 if subdir != "": 301 if subdir != "":
302 readpathspec = ":%s" % (subdir) 302 readpathspec = ":%s" % subdir
303 def_destsuffix = "%s/" % os.path.basename(subdir.rstrip('/')) 303 def_destsuffix = "%s/" % os.path.basename(subdir.rstrip('/'))
304 else: 304 else:
305 readpathspec = "" 305 readpathspec = ""
@@ -469,7 +469,7 @@ class Git(FetchMethod):
469 if not os.path.exists(rev_file) or not os.path.getsize(rev_file): 469 if not os.path.exists(rev_file) or not os.path.getsize(rev_file):
470 from pipes import quote 470 from pipes import quote
471 commits = bb.fetch2.runfetchcmd( 471 commits = bb.fetch2.runfetchcmd(
472 "git rev-list %s -- | wc -l" % (quote(rev)), 472 "git rev-list %s -- | wc -l" % quote(rev),
473 d, quiet=True).strip().lstrip('0') 473 d, quiet=True).strip().lstrip('0')
474 if commits: 474 if commits:
475 open(rev_file, "w").write("%d\n" % int(commits)) 475 open(rev_file, "w").write("%d\n" % int(commits))