From: Gordon Hecker Date: Mon, 26 Oct 2009 10:36:13 +0000 (+0100) Subject: give a meaningful error message when the build script fails to leave any X-Git-Tag: e2factory-2.3.2rc1~31 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=1b695fa0c6e49c9647c5f140f91f43b71b11a80a;p=e2factory.git give a meaningful error message when the build script fails to leave any files in the build output directory. Signed-off-by: Gordon Hecker --- diff --git a/local/e2build.lua b/local/e2build.lua index bdb2656..59f9a9b 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -708,6 +708,7 @@ function e2build.store_result(info, r, return_flags) if not rc then return false, e:cat(re) end + local nfiles = 0 for f in e2lib.directory(rfilesdir, false, true) do e2lib.logf(3, "result file: %s", f) local s = string.format("%s/%s", rfilesdir, f) @@ -722,6 +723,13 @@ function e2build.store_result(info, r, return_flags) return false, e:cat(re) end end + nfiles = nfiles + 1 + end + if nfiles < 1 then + e:append("No output files available.") + e:append("Please make sure your build script leaves at least one file in") + e:append("the output directory.") + return false, e end rc, re = e2lib.chdir("result") if not rc then