]> git.e2factory.org Git - e2factory.git/commitdiff
cache: warn about missing push_permissions
authorTobias Ulmer <tu@emlix.com>
Thu, 3 Nov 2016 17:06:16 +0000 (18:06 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:18 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/cache.lua

index edbff6bf3fbca7561c10793daccdf00b7eb42fe1..fe3b7a0ff352d3add461d40987bcc4fe4cfc7ea7 100644 (file)
@@ -739,6 +739,8 @@ local function cache_writeback(c, server, location, flags)
     return true
 end
 
+local _pp_warn = true
+
 --- push a file to a server: cache and writeback
 -- @param c a cache table
 -- @param sourcefile where to store the file locally
@@ -758,6 +760,12 @@ function cache.push_file(c, sourcefile, server, location, flags)
         return false, e:cat(re)
     end
 
+    if _pp_warn and not ce.flags.push_permissions then
+        e2lib.warnf("WOTHER", "push_permissions for server %s not set, "..
+            "file permissions may be wrong", server)
+        _pp_warn = false
+    end
+
     if cache.cache_enabled(c, server, flags) then
         -- cache is enabled:
         -- push the file from source to cache and from cache to