]> git.e2factory.org Git - e2factory.git/commitdiff
use e2tool.fileid() to get fileid for build scripts
authorGordon Hecker <gh@emlix.com>
Wed, 11 Nov 2009 12:44:07 +0000 (13:44 +0100)
committerGordon Hecker <gh@emlix.com>
Wed, 18 Nov 2009 11:12:08 +0000 (12:12 +0100)
use e2tool.fileid() to get fileid for init scripts

Signed-off-by: Gordon Hecker <gh@emlix.com>
local/e2tool.lua

index 7c6a60bc7f24953f6d7693f899f4de973d607e0f..abc66787aa3fc6c02cb0471a9cb2378d153c8d24 100644 (file)
@@ -1161,13 +1161,16 @@ function e2tool.projid(info)
                if not e2lib.is_backup_file(f) then
                        local location = string.format("proj/init/%s", 
                                                        e2lib.basename(f))
-                       local hash, e = e2tool.hash_file(info,
-                                       info.root_server_name, location)
-                       if not hash then
+                       local f = {
+                               server = info.root_server_name,
+                               location = location,
+                       }
+                       local fileid, e = e2tool.fileid(info, f)
+                       if not fileid then
                                e2lib.abort(e)
                        end
-                       hc:hash_line(location)          -- the filename
-                       hc:hash_line(hash)      -- the file content
+                       hc:hash_line(location)  -- the filename
+                       hc:hash_line(fileid)    -- the file content
                end
        end
        hc:hash_line(info.release_id)
@@ -1483,12 +1486,15 @@ function e2tool.pbuildid(info, resultname)
        hc:hash_line(r.envid)
        if not r.pseudo_result then
                local location = e2tool.resultbuildscript(info.results[resultname].directory)
-               local hash, re = e2tool.hash_file(info,info.root_server_name, 
-                                                               location)
-               if not hash then
+               local f = {
+                       server = info.root_server_name,
+                       location = location,
+               }
+               local fileid, re = e2tool.fileid(info, f)
+               if not fileid then
                        return nil, e:cat(re)
-               end     
-               hc:hash_line(hash)                      -- build script hash
+               end
+               hc:hash_line(fileid)                    -- build script hash
        end
        e2lib.log(4, string.format("hash data for resultid %s\n%s",
                                                        resultname, hc.data))