]> git.e2factory.org Git - e2factory.git/commitdiff
source config: enforce checksum configuration in sha1 attribute in source
authorGordon Hecker <gh@emlix.com>
Thu, 29 Oct 2009 12:58:56 +0000 (13:58 +0100)
committerGordon Hecker <gh@emlix.com>
Thu, 29 Oct 2009 14:27:48 +0000 (15:27 +0100)
configuration for all servers except ".".

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

index b47b3503ba381735d5fbac8509918695c375d714..83bbd4b066f2f62446f28d958b0e3c1beeed0e55 100644 (file)
@@ -82,6 +82,10 @@ function files.validate_source(info, sourcename)
       if not f.location then
        e:append("source has file entry without `location' attribute")
       end
+      if f.server ~= info.root_server_name and not f.sha1 then
+       e:append("source has file entry for remote file without `sha1` "..
+                                                               "attribute")
+      end
       if not (f.unpack or f.copy or f.patch) then
         e:append("source has file entry without `unpack, copy or patch' " ..
                        "attribute")