From 05a9d94515c10f00a982439a7ea7cac6770f1497 Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Thu, 30 Jan 2014 19:53:29 +0100 Subject: [PATCH] files: error out if the unpack location doesn't exist after unpacking A mistake here leads to a confusing error message that is by itself correct, but hard to understand for the user. Signed-off-by: Tobias Ulmer --- plugins/files.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/files.lua b/plugins/files.lua index 86fd2bc..a1b77cc 100644 --- a/plugins/files.lua +++ b/plugins/files.lua @@ -373,6 +373,12 @@ function files.prepare_source(info, sourcename, sourceset, buildpath) return false, e:cat(re) end + local expected_location = e2lib.join(buildpath, file.unpack) + if not e2lib.stat(expected_location, true) then + return false, err.new("expected unpack location '%s' does not exist", + expected_location) + end + if not symlink then symlink = buildpath .. "/" .. sourcename if file.unpack ~= sourcename then @@ -380,6 +386,8 @@ function files.prepare_source(info, sourcename, sourceset, buildpath) if not rc then return false, e:cat(re) end + + end end else -- 2.39.5