1
0
mirror of https://git.yoctoproject.org/poky synced 2026-07-16 15:57:04 +00:00

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>
This commit is contained in:
Andreas Oberritter
2010-12-08 13:38:23 +00:00
committed by Richard Purdie
parent 7bbde5b149
commit bd34e7d6df
6 changed files with 48 additions and 11 deletions
+7 -1
View File
@@ -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: