From: Gordon Hecker Date: Fri, 20 Nov 2009 08:47:36 +0000 (+0100) Subject: bugfix: fix error checking in files.sourceid() X-Git-Tag: e2factory-2.3.3rc1~12 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=f835cc1cf9d49ba01362aaefa26f79c6228eeed4;p=e2factory.git bugfix: fix error checking in files.sourceid() Signed-off-by: Gordon Hecker --- diff --git a/local/files.lua b/local/files.lua index dd25f35..e925046 100644 --- a/local/files.lua +++ b/local/files.lua @@ -309,10 +309,11 @@ end -- @return string: the source id, nil on error -- @return an error string on error function files.sourceid(info, sourcename, sourceset) - local rc, e - rc, e = files.validate_source(info, sourcename) + local rc, re + local e = new_error("%s: error calculating sourceid", sourcename) + rc, re = files.validate_source(info, sourcename) if not rc then - return false, e + return false, re end local src = info.sources[sourcename] if src.sourceid then @@ -331,7 +332,7 @@ function files.sourceid(info, sourcename, sourceset) hash.hash_line(hc, licenceid) end for _,f in ipairs(src.file) do - local fileid = e2tool.fileid(info, f) + local fileid, re = e2tool.fileid(info, f) if not fileid then return false, e:cat(re) end