diff options
author | Richard Purdie <rpurdie@linux.intel.com> | 2008-01-20 12:07:40 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2008-01-20 12:07:40 +0000 |
commit | b0b0f8043985c95163b952dcda5574fc9850b4b8 (patch) | |
tree | 67f7e9ac7683631bee6ecdbf90dfd7c106000681 | |
parent | 152bd6c4ec09bef0af71aafc4c0f2ba3891c745d (diff) | |
download | bitbake-b0b0f8043985c95163b952dcda5574fc9850b4b8.tar.gz |
cvs.py: Add norecurse and fullpath options to cvs fetcher (from Poky/Marcin)
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | lib/bb/fetch/cvs.py | 23 |
2 files changed, 20 insertions, 4 deletions
@@ -93,6 +93,7 @@ Changes in Bitbake 1.9.x: - Change the wget fetcher failure handling to avoid lockfile problems - Add support for branches in git fetcher (Otavio Salvador, Michael Lauer) - Make taskdata and runqueue errors more user friendly + - Add norecurse and fullpath options to cvs fetcher Changes in Bitbake 1.8.0: - Release 1.7.x as a stable series diff --git a/lib/bb/fetch/cvs.py b/lib/bb/fetch/cvs.py index bd3317166..70869d22a 100644 --- a/lib/bb/fetch/cvs.py +++ b/lib/bb/fetch/cvs.py @@ -58,7 +58,15 @@ class Cvs(Fetch): elif ud.tag: ud.date = "" - ud.localfile = data.expand('%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.tag, ud.date), d) + norecurse = '' + if 'norecurse' in ud.parm: + norecurse = '_norecurse' + + 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) @@ -100,6 +108,8 @@ class Cvs(Fetch): cvsroot += "@" + ud.host + ":" + cvs_port + ud.path options = [] + if 'norecurse' in ud.parm: + options.append("-l") if ud.date: options.append("-D %s" % ud.date) if ud.tag: @@ -144,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) |