]> git.e2factory.org Git - e2factory.git/commitdiff
deployment: enable deployment through the deploy_results attribute in proj/config
authorGordon Hecker <gh@emlix.com>
Wed, 5 May 2010 12:23:24 +0000 (14:23 +0200)
committerGordon Hecker <gh@emlix.com>
Mon, 17 May 2010 07:59:57 +0000 (09:59 +0200)
Signed-off-by: Gordon Hecker <gh@emlix.com>
doc/manual/project.text
local/e2build.lua
local/e2tool.lua

index 9bb3f1b9dfebeffa62f90dce0246d7117d756634..9779f9379b2d8556f8850d2f978ea5021b92f3cf 100644 (file)
@@ -13,6 +13,7 @@ The table must specify the following keys:
 *   release_id string: release identifier
 *   name string: project name
 *   default_results table: list of results to build by default
+*   deploy_results table: list of results to deploy to archive in release mode
 
 The table may specify the following additional keys:
 
@@ -31,6 +32,9 @@ Example:
         name = "foo",
         release_id = "foo-1.0beta",
         default_results = { "foo" },
+        deploy_results = {
+                "bar",
+        },
         chroot_arch = "x86_32",
     }
 
index 5ce6452bf8ad64371cfae1f4672750270739478b..02640f9be29c63a1c18074319cd5717afc50cf3e 100644 (file)
@@ -1233,6 +1233,10 @@ function deploy(info, r, return_flags)
     e2lib.logf(1, "deployment disabled for this build mode")
     return true
   end
+  if not res._deploy then
+    e2lib.logf(1, "deployment disabled for this result")
+    return true
+  end
   local files = {}
   for f in e2lib.directory("result/files") do
     table.insert(files, string.format("files/%s", f))
index 5d75b5609e9f585ccc7f4137520a7595bff7d43a..886bb53957977b1b7f57504190a8831f2c18d878 100644 (file)
@@ -579,6 +579,11 @@ The newest configuration syntax supported by the tools is %s.
                "default_results ist not set. Defaulting to empty list.")
     info.project.default_results = {}
   end
+  rc, re = listofstrings(info.project.deploy_results, true, true)
+  if not rc then
+    e:append("deploy_results ist not a valid list of strings")
+    e:cat(re)
+  end
   rc, re = listofstrings(info.project.default_results, true, false)
   if not rc then
     e:append("default_results ist not a valid list of strings")
@@ -807,6 +812,11 @@ function check_project_info(info, all, access, verbose)
       e:append("default_results: No such result: %s", r)
     end
   end
+  for _, r in ipairs(info.project.deploy_results) do
+    if not info.results[r] then
+      e:append("deploy_results: No such result: %s", r)
+    end
+  end
   if e:getcount() > 1 then
     return false, e
   end
@@ -1957,6 +1967,12 @@ function check_result(info, resultname)
                res.bn = {}
                res.buildno = "0"
        end
+       for _,r in ipairs(info.project.deploy_results) do
+               if r == resultname then
+                       res._deploy = true
+                       break
+               end
+       end
        local build_script = string.format("%s/%s", info.root,
                resultbuildscript(info.results[resultname].directory))
        if not e2lib.isfile(build_script) then