summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2/osc.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/fetch2/osc.py')
-rw-r--r--bitbake/lib/bb/fetch2/osc.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py
index d051dfdafa..295abf953b 100644
--- a/bitbake/lib/bb/fetch2/osc.py
+++ b/bitbake/lib/bb/fetch2/osc.py
@@ -88,23 +88,21 @@ class Osc(FetchMethod):
88 oscupdatecmd = self._buildosccommand(ud, d, "update") 88 oscupdatecmd = self._buildosccommand(ud, d, "update")
89 logger.info("Update "+ ud.url) 89 logger.info("Update "+ ud.url)
90 # update sources there 90 # update sources there
91 os.chdir(ud.moddir)
92 logger.debug(1, "Running %s", oscupdatecmd) 91 logger.debug(1, "Running %s", oscupdatecmd)
93 bb.fetch2.check_network_access(d, oscupdatecmd, ud.url) 92 bb.fetch2.check_network_access(d, oscupdatecmd, ud.url)
94 runfetchcmd(oscupdatecmd, d) 93 runfetchcmd(oscupdatecmd, d, workdir=ud.moddir)
95 else: 94 else:
96 oscfetchcmd = self._buildosccommand(ud, d, "fetch") 95 oscfetchcmd = self._buildosccommand(ud, d, "fetch")
97 logger.info("Fetch " + ud.url) 96 logger.info("Fetch " + ud.url)
98 # check out sources there 97 # check out sources there
99 bb.utils.mkdirhier(ud.pkgdir) 98 bb.utils.mkdirhier(ud.pkgdir)
100 os.chdir(ud.pkgdir)
101 logger.debug(1, "Running %s", oscfetchcmd) 99 logger.debug(1, "Running %s", oscfetchcmd)
102 bb.fetch2.check_network_access(d, oscfetchcmd, ud.url) 100 bb.fetch2.check_network_access(d, oscfetchcmd, ud.url)
103 runfetchcmd(oscfetchcmd, d) 101 runfetchcmd(oscfetchcmd, d, workdir=ud.pkgdir)
104 102
105 os.chdir(os.path.join(ud.pkgdir + ud.path))
106 # tar them up to a defined filename 103 # tar them up to a defined filename
107 runfetchcmd("tar -czf %s %s" % (ud.localpath, ud.module), d, cleanup = [ud.localpath]) 104 runfetchcmd("tar -czf %s %s" % (ud.localpath, ud.module), d,
105 cleanup=[ud.localpath], workdir=os.path.join(ud.pkgdir + ud.path))
108 106
109 def supports_srcrev(self): 107 def supports_srcrev(self):
110 return False 108 return False