summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb/fetch/repo.py
diff options
context:
space:
mode:
authorAndreas Oberritter <obi@opendreambox.org>2010-12-08 13:38:23 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:51 +0000
commitbd34e7d6dffbdcd3cfb0bc21daf73e9090e5110f (patch)
tree4eb6fdd4501facd55b4921f7b09f35bac638b79f /bitbake/lib/bb/fetch/repo.py
parent7bbde5b149751c2b38964b786b76a25f62199397 (diff)
downloadopenembedded-core-bd34e7d6dffbdcd3cfb0bc21daf73e9090e5110f.tar.gz
openembedded-core-bd34e7d6dffbdcd3cfb0bc21daf73e9090e5110f.tar.bz2
openembedded-core-bd34e7d6dffbdcd3cfb0bc21daf73e9090e5110f.tar.xz
openembedded-core-bd34e7d6dffbdcd3cfb0bc21daf73e9090e5110f.zip
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. (Bitbake rev: 05cbc1d1a01c667c77688f36fbc5b61c5f452a3a) Signed-off-by: Andreas Oberritter <obi@opendreambox.org> Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch/repo.py')
-rw-r--r--bitbake/lib/bb/fetch/repo.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch/repo.py b/bitbake/lib/bb/fetch/repo.py
index e5132a14f..03642e7a0 100644
--- a/bitbake/lib/bb/fetch/repo.py
+++ b/bitbake/lib/bb/fetch/repo.py
@@ -79,8 +79,14 @@ class Repo(Fetch):
runfetchcmd("repo sync", d)
os.chdir(codir)
+ scmdata = ud.parm.get("scmdata", "")
+ if scmdata == "keep":
+ tar_flags = ""
+ else:
+ tar_flags = "--exclude '.repo' --exclude '.git'"
+
# Create a cache
- runfetchcmd("tar --exclude=.repo --exclude=.git -czf %s %s" % (ud.localpath, os.path.join(".", "*") ), d)
+ runfetchcmd("tar %s -czf %s %s" % (tar_flags, ud.localpath, os.path.join(".", "*") ), d)
def supports_srcrev(self):
return False