]> git.e2factory.org Git - e2factory.git/commitdiff
files: fix sourceid calculation in rare licences configuration
authorTobias Ulmer <tu@emlix.com>
Wed, 26 Oct 2016 18:42:33 +0000 (20:42 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:18 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
plugins/files.lua

index ee4e3349d9f31f661ff3e27a7994df133dd9ed2d..2ca0daba86b74bf43da038437a96f18cb1d293e4 100644 (file)
@@ -277,6 +277,15 @@ function files.files_source:sourceid(sourceset --[[always ignored for files]])
     hash.hash_append(hc, self._type)
     hash.hash_append(hc, self._env:id())
 
+    -- all licences
+    for licencename in self:get_licences():iter_sorted() do
+        local lid, re = licence.licences[licencename]:licenceid(info)
+        if not lid then
+            return false, re
+        end
+        hash.hash_append(hc, lid)
+    end
+
     for f in self:file_iter() do
         local fileid, re = e2tool.fileid(info, f)
         if not fileid then