diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/osc.py')
| -rw-r--r-- | bitbake/lib/bb/fetch2/osc.py | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/bitbake/lib/bb/fetch2/osc.py b/bitbake/lib/bb/fetch2/osc.py index 14bde82fd7..9b97cf1cc7 100644 --- a/bitbake/lib/bb/fetch2/osc.py +++ b/bitbake/lib/bb/fetch2/osc.py | |||
| @@ -28,7 +28,7 @@ class Osc(Fetch): | |||
| 28 | 28 | ||
| 29 | def urldata_init(self, ud, d): | 29 | def urldata_init(self, ud, d): |
| 30 | if not "module" in ud.parm: | 30 | if not "module" in ud.parm: |
| 31 | raise MissingParameterError("osc method needs a 'module' parameter.") | 31 | raise MissingParameterError('module', ud.url) |
| 32 | 32 | ||
| 33 | ud.module = ud.parm["module"] | 33 | ud.module = ud.parm["module"] |
| 34 | 34 | ||
| @@ -73,7 +73,7 @@ class Osc(Fetch): | |||
| 73 | elif command is "update": | 73 | elif command is "update": |
| 74 | osccmd = "%s %s up %s" % (basecmd, config, " ".join(options)) | 74 | osccmd = "%s %s up %s" % (basecmd, config, " ".join(options)) |
| 75 | else: | 75 | else: |
| 76 | raise FetchError("Invalid osc command %s" % command) | 76 | raise FetchError("Invalid osc command %s" % command, ud.url) |
| 77 | 77 | ||
| 78 | return osccmd | 78 | return osccmd |
| 79 | 79 | ||
| @@ -104,15 +104,7 @@ class Osc(Fetch): | |||
| 104 | 104 | ||
| 105 | os.chdir(os.path.join(ud.pkgdir + ud.path)) | 105 | os.chdir(os.path.join(ud.pkgdir + ud.path)) |
| 106 | # tar them up to a defined filename | 106 | # tar them up to a defined filename |
| 107 | try: | 107 | runfetchcmd("tar -czf %s %s" % (ud.localpath, ud.module), d, cleanup = [ud.localpath]) |
| 108 | runfetchcmd("tar -czf %s %s" % (ud.localpath, ud.module), d) | ||
| 109 | except: | ||
| 110 | t, v, tb = sys.exc_info() | ||
| 111 | try: | ||
| 112 | os.unlink(ud.localpath) | ||
| 113 | except OSError: | ||
| 114 | pass | ||
| 115 | raise t, v, tb | ||
| 116 | 108 | ||
| 117 | def supports_srcrev(self): | 109 | def supports_srcrev(self): |
| 118 | return False | 110 | return False |
