]> git.e2factory.org Git - e2factory.git/commitdiff
Remove remnants of build-numbers support
authorTobias Ulmer <tu@emlix.com>
Wed, 22 May 2013 13:05:06 +0000 (15:05 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:00:21 +0000 (15:00 +0100)
This also removes the E2_BUILD_NUMBER variable

Signed-off-by: Tobias Ulmer <tu@emlix.com>
Changelog
local/e2-build.lua
local/e2build.lua
local/e2tool.lua
templates/local/build-script

index a804e5c4552d4afb1097cff1ba10eca72541392b..57517b375c6ba36ed967e4e790867c36076a078b 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -1,4 +1,5 @@
 NEXT:
+ * remove unusable E2_BUILD_NUMBER variable from build-script.
  * on git source update, fetch tags and prevent non-ff merges
 
 e2factory-2.3.14p1
index 5b491a5e80cc116b64e5cb980652db6c23dec081..2a45e11e3ef5248485b58e57289025fdda5e8745 100644 (file)
@@ -166,12 +166,11 @@ local function e2_build(arg)
         end
     end
     local force_rebuild = opts["force-rebuild"]
-    local request_buildno = opts["request-buildno"]
     local keep_chroot = opts["keep"]
 
     -- apply flags to the selected results
     rc, re = e2tool.select_results(info, results, force_rebuild,
-        request_buildno, keep_chroot, build_mode, playground)
+        keep_chroot, build_mode, playground)
     if not rc then
         return false, re
     end
index a4045bf8e107db42173c1541b9b1a3abfebe9cfe..ec1fb4069d4b83288258c6a63e71dfb8f633da38 100644 (file)
@@ -227,7 +227,6 @@ function e2build.build_config(info, r)
     tab.buildrc_noinit_file = string.format("buildrc-noinit")
     tab.profile = string.format("/tmp/bashrc")
     tab.builtin_env = environment.new()
-    tab.builtin_env:set("E2_BUILD_NUMBER", res.buildno)
     tab.builtin_env:set("E2_TMPDIR", res.build_config.Tc)
     tab.builtin_env:set("E2_RESULT", r)
     tab.builtin_env:set("E2_RELEASE_ID", info.project.release_id)
@@ -1215,8 +1214,7 @@ local function collect_project(info, r, return_flags)
         end
         -- generate builtin environment script
         local file = string.format("%s/builtin", destdir)
-        rc, re = write_environment_script(
-        rn.build_config.builtin_env, file)
+        rc, re = write_environment_script(rn.build_config.builtin_env, file)
         if not rc then
             return false, e:cat(re)
         end
index 281ef89b2c8501ba342270b816c0c758e4dc29e5..d70b67ddc5c03e83f2250101fa4ebde2754ef2de 100644 (file)
@@ -583,10 +583,6 @@ local function check_result(info, resultname)
             end
         end
     end
-    if not res.buildno then
-        res.bn = {}
-        res.buildno = "0"
-    end
     for _,r in ipairs(info.project.deploy_results) do
         if r == resultname then
             res._deploy = true
@@ -2156,7 +2152,6 @@ function e2tool.buildid(info, resultname)
         return false, e
     end
     local hc = hash.hash_start()
-    hc:hash_line(r.buildno)
     hc:hash_line(r.pbuildid)
     r.buildid = hc:hash_finish()
     return r.build_mode.buildid(r.buildid)
@@ -2387,13 +2382,12 @@ end
 -- @param info
 -- @param r string: the result name
 -- @param force_rebuild bool
--- @param request_buildno bool
 -- @param keep_chroot bool
 -- @param build_mode table: build mode policy
 -- @param playground bool
 -- @return True on success, false on error.
 -- @return Error object on failure.
-local function select_result(info, r, force_rebuild, request_buildno, keep_chroot, build_mode, playground)
+local function select_result(info, r, force_rebuild, keep_chroot, build_mode, playground)
     local rc, re = e2tool.verify_src_res_name_valid_chars(r)
     if not rc then
         return false, err.new("'%s' is not a valid result name", r)
@@ -2405,7 +2399,6 @@ local function select_result(info, r, force_rebuild, request_buildno, keep_chroo
     end
     res.selected = true
     res.force_rebuild = force_rebuild
-    res.request_buildno = request_buildno
     res.keep_chroot = keep_chroot
     if build_mode then
         res.build_mode = build_mode
@@ -2421,18 +2414,17 @@ end
 -- @param info the info structure
 -- @param results table: list of result names
 -- @param force_rebuild bool
--- @param request_buildno bool
 -- @param keep_chroot bool
 -- @param build_mode table: build mode policy. Optional.
 -- @param playground bool
 -- @return bool
 -- @return an error object on failure
-function e2tool.select_results(info, results, force_rebuild, request_buildno, keep_chroot, build_mode, playground)
+function e2tool.select_results(info, results, force_rebuild, keep_chroot, build_mode, playground)
     local rc, re
 
     for _,r in ipairs(results) do
-        rc, re = select_result(info, r, force_rebuild, request_buildno,
-            keep_chroot, build_mode, playground)
+        rc, re = select_result(info, r, force_rebuild, keep_chroot, build_mode,
+            playground)
         if not rc then
             return false, re
         end
@@ -2455,9 +2447,8 @@ function e2tool.print_selection(info, results)
         end
         local s = res.selected and "[ selected ]" or "[dependency]"
         local f = res.force_rebuild and "[force rebuild]" or ""
-        local b = res.request_buildno and "[request buildno]" or ""
         local p = res.playground and "[playground]" or ""
-        e2lib.logf(3, "Selected result: %-20s %s %s %s %s", r, s, f, b, p)
+        e2lib.logf(3, "Selected result: %-20s %s %s %s", r, s, f, p)
     end
     return true, nil
 end
index b7a32db9f28e96b58838c952aedd954f6f571d51..40475347fbfb52e928f04d9b375e5463a458e89d 100644 (file)
@@ -7,7 +7,6 @@
 # - E2_TMPDIR       pointing to a temporary directory with a directory
 #                   structure
 # - E2_RESULT       the name of the result currently building
-# - E2_BUILD_NUMBER the build number, 0 by default
 #
 # Additional variables can be provided in init files.
 # Variables are not exported unless the init files do.