From 24795bc45dbf5418e5036f6d743a5450fed5c7b9 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Tue, 5 Feb 2013 18:41:50 +0100 Subject: [PATCH] Remove warning when hardlinking fails Also remove bogus error catenation. Link failures will still be logged by the kernel, but they are harmless. Signed-off-by: Tobias Ulmer --- local/e2build.lua | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/local/e2build.lua b/local/e2build.lua index b98be4d..54057bc 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -868,9 +868,14 @@ local function store_result(info, r, return_flags) local d = "result/files" rc, re = e2lib.ln(s, d) if not rc then - e:cat(re) - e2lib.warnf("WOTHER", - "Creating hardlink failed. Falling back to copying.") + -- There are three reasons this might fail + -- a) Legitimate IO etc. errors. + -- b) Source and destination are not on the same filesystem. + -- c) The file being linked to is owned by root, but the process is + -- not root. It would be nice to fix this case by changing + -- ownership of the source before copying, since this security + -- feature (of recentish Linux) basically makes the optimization + -- moot. rc, re = e2lib.cp(s, d) if not rc then return false, e:cat(re) -- 2.39.5