diff options
author | Yu Ke <ke.yu@intel.com> | 2011-01-18 23:35:30 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-02-10 23:36:43 +0000 |
commit | dee27c176a78e8855d7062459f3df6af53de031d (patch) | |
tree | 78d0f7daaa01bc67f6211082d3b5e0313b4be592 /lib/bb/fetch2/git.py | |
parent | a8f231507842a8202783276f554ad42ce762c935 (diff) | |
download | bitbake-dee27c176a78e8855d7062459f3df6af53de031d.tar.gz |
git.py: split download to download() and build_mirror_data()
the download is to fetch the source from URL, the build_mirror_data is
to create the mirror tar ball. the original go() method mix them together,
it is more clean to split them.
(From Poky rev: ef918a72de97fd2189e1c8487e371d13e18088fd)
Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'lib/bb/fetch2/git.py')
-rw-r--r-- | lib/bb/fetch2/git.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index c962acb10..d47191e57 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -116,9 +116,6 @@ class Git(Fetch): repofile = os.path.join(data.getVar("DL_DIR", d, 1), ud.mirrortarball) - coname = '%s' % (ud.tag) - codir = os.path.join(ud.clonedir, coname) - # If we have no existing clone and no mirror tarball, try and obtain one if not os.path.exists(ud.clonedir) and not os.path.exists(repofile): try: @@ -149,7 +146,12 @@ class Git(Fetch): runfetchcmd("%s prune-packed" % ud.basecmd, d) runfetchcmd("%s pack-redundant --all | xargs -r rm" % ud.basecmd, d) + def build_mirror_data(self, url, ud, d): # Generate a mirror tarball if needed + coname = '%s' % (ud.tag) + codir = os.path.join(ud.clonedir, coname) + repofile = os.path.join(data.getVar("DL_DIR", d, 1), ud.mirrortarball) + os.chdir(ud.clonedir) mirror_tarballs = data.getVar("BB_GENERATE_MIRROR_TARBALLS", d, True) if mirror_tarballs != "0" or 'fullclone' in ud.parm: |