summaryrefslogtreecommitdiff
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openedhand.com>2008-01-16 10:58:57 +0000
committerMarcin Juszkiewicz <hrw@openedhand.com>2008-01-16 10:58:57 +0000
commit58915670609f715451f10d352a439deb70977743 (patch)
tree02f4df2e9328d0841a98b81c2e760553d1e63d28 /bitbake/lib/bb
parentcc1e39fab24b0eaf4f42eff2cfa2dc1eb8899d34 (diff)
downloadopenembedded-core-58915670609f715451f10d352a439deb70977743.tar.gz
openembedded-core-58915670609f715451f10d352a439deb70977743.tar.bz2
openembedded-core-58915670609f715451f10d352a439deb70977743.tar.xz
openembedded-core-58915670609f715451f10d352a439deb70977743.zip
CVS fetcher: added "fullpath" option to get full repository paths inside of
checkout archive tarballs. It is very useful when used with "norecurse" option. git-svn-id: https://svn.o-hand.com/repos/poky/trunk@3496 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/fetch/cvs.py17
1 files changed, 13 insertions, 4 deletions
diff --git a/bitbake/lib/bb/fetch/cvs.py b/bitbake/lib/bb/fetch/cvs.py
index 755c5983f..70869d22a 100644
--- a/bitbake/lib/bb/fetch/cvs.py
+++ b/bitbake/lib/bb/fetch/cvs.py
@@ -62,7 +62,11 @@ class Cvs(Fetch):
if 'norecurse' in ud.parm:
norecurse = '_norecurse'
- ud.localfile = data.expand('%s_%s_%s_%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date, norecurse), d)
+ fullpath = ''
+ if 'fullpath' in ud.parm:
+ fullpath = '_fullpath'
+
+ ud.localfile = data.expand('%s_%s_%s_%s%s%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date, norecurse, fullpath), d)
return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
@@ -150,10 +154,15 @@ class Cvs(Fetch):
pass
raise FetchError(ud.module)
- os.chdir(moddir)
- os.chdir('..')
# tar them up to a defined filename
- myret = os.system("tar -czf %s %s" % (ud.localpath, os.path.basename(moddir)))
+ if 'fullpath' in ud.parm:
+ os.chdir(pkgdir)
+ myret = os.system("tar -czf %s %s" % (ud.localpath, localdir))
+ else:
+ os.chdir(moddir)
+ os.chdir('..')
+ myret = os.system("tar -czf %s %s" % (ud.localpath, os.path.basename(moddir)))
+
if myret != 0:
try:
os.unlink(ud.localpath)