]> git.e2factory.org Git - e2factory.git/commitdiff
files: error out if the unpack location doesn't exist after unpacking
authorTobias Ulmer <tu@emlix.com>
Thu, 30 Jan 2014 18:53:29 +0000 (19:53 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:17 +0000 (15:41 +0100)
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 <tu@emlix.com>
plugins/files.lua

index 86fd2bc40331b8622e8a1bf611fb1bb04073800b..a1b77cc0ed9a1ac6b03b66ee4b9e9b42df33f6e1 100644 (file)
@@ -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