if not rc then return nil, re end
end
for _,l in ipairs(licence.licences_sorted) do
- rc, re = hash.hash_line(hc, l:get_name())
- if not rc then return nil, re end
-
-- We collect all licences. So we cannot be sure to catch
-- them via results/sources. Include them explicitly here.
local lid, re = l:licenceid(info)
hash.hash_line(hc, src.name)
hash.hash_line(hc, src.type)
hash.hash_line(hc, src._env:id())
- for _,l in ipairs(src.licences) do
- local alicence = licence.licences[l]
- hash.hash_line(hc, l)
- local licenceid, re = alicence:licenceid(info)
- if not licenceid then
+ for _,ln in ipairs(src.licences) do
+ local lid, re = licence.licences[ln]:licenceid(info)
+ if not lid then
return false, re
end
- hash.hash_line(hc, licenceid)
+ hash.hash_line(hc, lid)
end
for _,f in ipairs(src.file) do
local fileid, re = e2tool.fileid(info, f)
hash.hash_line(hc, src.name)
hash.hash_line(hc, src.type)
hash.hash_line(hc, src._env:id())
- for _,l in ipairs(src.licences) do
- hash.hash_line(hc, l) -- XXX: redundant
- local licenceid, re = licence.licences[l]:licenceid(info)
- if not licenceid then
+ for _,ln in ipairs(src.licences) do
+ local lid, re = licence.licences[ln]:licenceid(info)
+ if not lid then
return false, re
end
- hash.hash_line(hc, licenceid)
+ hash.hash_line(hc, lid)
end
-- git specific
--hash.hash_line(hc, src.branch)