From bd34e7d6dffbdcd3cfb0bc21daf73e9090e5110f Mon Sep 17 00:00:00 2001 From: Andreas Oberritter Date: Wed, 8 Dec 2010 13:38:23 +0000 Subject: 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 Signed-off-by: Chris Larson Signed-off-by: Richard Purdie --- bitbake/lib/bb/fetch/cvs.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'bitbake/lib/bb/fetch/cvs.py') diff --git a/bitbake/lib/bb/fetch/cvs.py b/bitbake/lib/bb/fetch/cvs.py index bd919e234e..0edb794b04 100644 --- a/bitbake/lib/bb/fetch/cvs.py +++ b/bitbake/lib/bb/fetch/cvs.py @@ -149,14 +149,20 @@ class Cvs(Fetch): pass raise FetchError(ud.module) + scmdata = ud.parm.get("scmdata", "") + if scmdata == "keep": + tar_flags = "" + else: + tar_flags = "--exclude 'CVS'" + # tar them up to a defined filename if 'fullpath' in ud.parm: os.chdir(pkgdir) - myret = os.system("tar --exclude 'CVS' -czf %s %s" % (ud.localpath, localdir)) + myret = os.system("tar %s -czf %s %s" % (tar_flags, ud.localpath, localdir)) else: os.chdir(moddir) os.chdir('..') - myret = os.system("tar -czf %s %s" % (ud.localpath, os.path.basename(moddir))) + myret = os.system("tar %s -czf %s %s" % (tar_flags, ud.localpath, os.path.basename(moddir))) if myret != 0: try: -- cgit v1.2.3