diff options
author | Andreas Oberritter <obi@opendreambox.org> | 2010-12-08 13:38:23 +0000 |
---|---|---|
committer | Chris Larson <chris_larson@mentor.com> | 2010-12-15 15:40:28 -0700 |
commit | 05cbc1d1a01c667c77688f36fbc5b61c5f452a3a (patch) | |
tree | 9a5070e4be106ebe097a5c81a59251dcd0f49cea /lib/bb/fetch/hg.py | |
parent | 3a4b5eb20e41bd3cecd9d7e8dff7d076d8a7bb9a (diff) | |
download | bitbake-05cbc1d1a01c667c77688f36fbc5b61c5f452a3a.tar.gz |
fetchers: Add parameter scmdata=keep to include .git/ and others in generated tarballs.
* Allows generating version information from SCMs during build.
* Note that tar doesn't need to use --exclude '.git', because
git checkout-index doesn't clone the repository.
Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
Signed-off-by: Chris Larson <chris_larson@mentor.com>
Diffstat (limited to 'lib/bb/fetch/hg.py')
-rw-r--r-- | lib/bb/fetch/hg.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/bb/fetch/hg.py b/lib/bb/fetch/hg.py index 6bc261ae6..3c649a6ad 100644 --- a/lib/bb/fetch/hg.py +++ b/lib/bb/fetch/hg.py @@ -143,9 +143,15 @@ class Hg(Fetch): logger.debug(1, "Running %s", updatecmd) runfetchcmd(updatecmd, d) + scmdata = ud.parm.get("scmdata", "") + if scmdata == "keep": + tar_flags = "" + else: + tar_flags = "--exclude '.hg' --exclude '.hgrags'" + os.chdir(ud.pkgdir) try: - runfetchcmd("tar --exclude '.hg' --exclude '.hgrags' -czf %s %s" % (ud.localpath, ud.module), d) + runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, ud.module), d) except: t, v, tb = sys.exc_info() try: |