summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch/svk.py
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2010-11-17 15:40:51 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2011-01-04 14:46:41 +0000
commit4df0d6adcaae5382009c356d750e7909a44284f6 (patch)
treed3b8b48e0ded47a63c4ea65b56add754cc750126 /bitbake/lib/bb/fetch/svk.py
parentb7d667f25283cddf8ff4fc9e35425a884a9f527e (diff)
downloadpoky-4df0d6adcaae5382009c356d750e7909a44284f6.tar.gz
fetch: be more pythonic
no functional changes (Bitbake rev: e88834fb7c6821cc29c12d296f2edd51f6eb3746) Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'bitbake/lib/bb/fetch/svk.py')
-rw-r--r--bitbake/lib/bb/fetch/svk.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/bitbake/lib/bb/fetch/svk.py b/bitbake/lib/bb/fetch/svk.py
index 2754971eba..595a9da255 100644
--- a/bitbake/lib/bb/fetch/svk.py
+++ b/bitbake/lib/bb/fetch/svk.py
@@ -48,18 +48,14 @@ class Svk(Fetch):
48 else: 48 else:
49 ud.module = ud.parm["module"] 49 ud.module = ud.parm["module"]
50 50
51 ud.revision = "" 51 ud.revision = ud.parm.get('rev', "")
52 if 'rev' in ud.parm:
53 ud.revision = ud.parm['rev']
54 52
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) 53 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 54
57 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile) 55 return os.path.join(data.getVar("DL_DIR", d, True), ud.localfile)
58 56
59 def forcefetch(self, url, ud, d): 57 def forcefetch(self, url, ud, d):
60 if (ud.date == "now"): 58 return ud.date == "now"
61 return True
62 return False
63 59
64 def go(self, loc, ud, d): 60 def go(self, loc, ud, d):
65 """Fetch urls""" 61 """Fetch urls"""
@@ -105,4 +101,4 @@ class Svk(Fetch):
105 pass 101 pass
106 raise FetchError(ud.module) 102 raise FetchError(ud.module)
107 # cleanup 103 # cleanup
108 os.system('rm -rf %s' % tmpfile) 104 bb.utils.prunedir(tmpfile)