From e83a89a45e035c97b127125abce0f8ee0113e01e Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Wed, 22 May 2013 15:05:06 +0200 Subject: [PATCH] Remove remnants of build-numbers support This also removes the E2_BUILD_NUMBER variable Signed-off-by: Tobias Ulmer --- Changelog | 1 + local/e2-build.lua | 3 +-- local/e2build.lua | 4 +--- local/e2tool.lua | 19 +++++-------------- templates/local/build-script | 1 - 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/Changelog b/Changelog index a804e5c..57517b3 100644 --- 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 diff --git a/local/e2-build.lua b/local/e2-build.lua index 5b491a5..2a45e11 100644 --- a/local/e2-build.lua +++ b/local/e2-build.lua @@ -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 diff --git a/local/e2build.lua b/local/e2build.lua index a4045bf..ec1fb40 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -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 diff --git a/local/e2tool.lua b/local/e2tool.lua index 281ef89..d70b67d 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -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 diff --git a/templates/local/build-script b/templates/local/build-script index b7a32db..4047534 100644 --- a/templates/local/build-script +++ b/templates/local/build-script @@ -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. -- 2.39.5