summaryrefslogtreecommitdiffstats
path: root/bitbake/lib
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-28 17:43:49 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-02 17:25:29 +0000
commit151eaca6e038fcc746e101bfda01ace9af984aef (patch)
treeb6f7a7cc5ea17176c9cc65eee321fbf1c90f3e62 /bitbake/lib
parente955def4d3929f44d27d2958ab3ff4b48534f26f (diff)
downloadpoky-151eaca6e038fcc746e101bfda01ace9af984aef.tar.gz
bitbake: fetch2: Drop svk fetcher
The svk fetcher never appears to be used by anyone and the development on svk appears to have stopped in 2010. We might as well drop support for it. (Bitbake rev: 8239264753977bd06ad5b1b574245d3842af489b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py2
-rw-r--r--bitbake/lib/bb/fetch2/svk.py95
2 files changed, 0 insertions, 97 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index dc6c821011..f1f2ee6020 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -1527,7 +1527,6 @@ from . import gitannex
1527from . import local 1527from . import local
1528from . import svn 1528from . import svn
1529from . import wget 1529from . import wget
1530from . import svk
1531from . import ssh 1530from . import ssh
1532from . import sftp 1531from . import sftp
1533from . import perforce 1532from . import perforce
@@ -1543,7 +1542,6 @@ methods.append(git.Git())
1543methods.append(gitsm.GitSM()) 1542methods.append(gitsm.GitSM())
1544methods.append(gitannex.GitANNEX()) 1543methods.append(gitannex.GitANNEX())
1545methods.append(cvs.Cvs()) 1544methods.append(cvs.Cvs())
1546methods.append(svk.Svk())
1547methods.append(ssh.SSH()) 1545methods.append(ssh.SSH())
1548methods.append(sftp.SFTP()) 1546methods.append(sftp.SFTP())
1549methods.append(perforce.Perforce()) 1547methods.append(perforce.Perforce())
diff --git a/bitbake/lib/bb/fetch2/svk.py b/bitbake/lib/bb/fetch2/svk.py
deleted file mode 100644
index 6f70a3be28..0000000000
--- a/bitbake/lib/bb/fetch2/svk.py
+++ /dev/null
@@ -1,95 +0,0 @@
1# ex:ts=4:sw=4:sts=4:et
2# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
3"""
4BitBake 'Fetch' implementations
5
6This implementation is for svk. It is based on the svn implementation
7
8"""
9
10# Copyright (C) 2006 Holger Hans Peter Freyther
11# Copyright (C) 2003, 2004 Chris Larson
12#
13# This program is free software; you can redistribute it and/or modify
14# it under the terms of the GNU General Public License version 2 as
15# published by the Free Software Foundation.
16#
17# This program is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20# GNU General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License along
23# with this program; if not, write to the Free Software Foundation, Inc.,
24# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25#
26# Based on functions from the base bb module, Copyright 2003 Holger Schurig
27
28import os
29import logging
30import bb
31from bb import data
32from bb.fetch2 import FetchMethod
33from bb.fetch2 import FetchError
34from bb.fetch2 import MissingParameterError
35from bb.fetch2 import logger
36from bb.fetch2 import runfetchcmd
37
38class Svk(FetchMethod):
39 """Class to fetch a module or modules from svk repositories"""
40 def supports(self, ud, d):
41 """
42 Check to see if a given url can be fetched with svk.
43 """
44 return ud.type in ['svk']
45
46 def urldata_init(self, ud, d):
47
48 if not "module" in ud.parm:
49 raise MissingParameterError('module', ud.url)
50 else:
51 ud.module = ud.parm["module"]
52
53 ud.revision = ud.parm.get('rev', "")
54
55 ud.localfile = data.expand('%s_%s_%s_%s_%s.tar.gz' % (ud.module.replace('/', '.'), ud.host, ud.path.replace('/', '.'), ud.revision, ud.date), d)
56
57 def need_update(self, ud, d):
58 if ud.date == "now":
59 return True
60 if not os.path.exists(ud.localpath):
61 return True
62 return False
63
64 def download(self, ud, d):
65 """Fetch urls"""
66
67 svkroot = ud.host + ud.path
68
69 svkcmd = "svk co -r {%s} %s/%s" % (ud.date, svkroot, ud.module)
70
71 if ud.revision:
72 svkcmd = "svk co -r %s %s/%s" % (ud.revision, svkroot, ud.module)
73
74 # create temp directory
75 logger.debug(2, "Fetch: creating temporary directory")
76 bb.utils.mkdirhier(d.expand('${WORKDIR}'))
77 mktemp = d.getVar("FETCHCMD_svkmktemp", True) or d.expand("mktemp -d -q '${WORKDIR}/oesvk.XXXXXX'")
78 tmpfile, errors = bb.process.run(mktemp)
79 tmpfile = tmpfile.strip()
80 if not tmpfile:
81 logger.error()
82 raise FetchError("Fetch: unable to create temporary directory.. make sure 'mktemp' is in the PATH.", ud.url)
83
84 # check out sources there
85 os.chdir(tmpfile)
86 logger.info("Fetch " + ud.url)
87 logger.debug(1, "Running %s", svkcmd)
88 runfetchcmd(svkcmd, d, cleanup = [tmpfile])
89
90 os.chdir(os.path.join(tmpfile, os.path.dirname(ud.module)))
91 # tar them up to a defined filename
92 runfetchcmd("tar -czf %s %s" % (ud.localpath, os.path.basename(ud.module)), d, cleanup = [ud.localpath])
93
94 # cleanup
95 bb.utils.prunedir(tmpfile)