From a0371f4d033cf09b71d3749ac02c52505793a827 Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Fri, 19 Jun 2009 17:23:31 +0200 Subject: [PATCH] remove all hook related code. The hook feature was not supported any more and will be replaced by plugin support soon. Signed-off-by: Gordon Hecker --- doc/man/Makefile | 2 +- doc/man/e2-build.1 | 2 - doc/man/e2-buildid.1 | 1 - doc/man/e2-create-project.1 | 2 - doc/man/e2-fetch-project.1 | 2 - doc/man/e2-fetch-sources.1 | 4 +- doc/man/e2-playground.1 | 2 - doc/man/e2config.5 | 1 - doc/man/e2hooks.7 | 183 -------------------------------- doc/man/e2intro.7 | 1 - generic/Makefile | 4 +- generic/e2hook.lua | 83 --------------- generic/e2lib.lua | 7 -- global/e2-create-project.lua.in | 2 - global/e2-fetch-project.lua.in | 2 - global/e2-install-e2.lua.in | 2 - local/Makefile | 1 - local/build-numbers.lua | 1 - local/build.lua | 4 - local/dlist.lua | 2 - local/dsort.lua | 2 - local/e2build.lua | 4 - local/e2tool.lua | 16 --- local/fetch-sources.lua | 4 - local/files.lua | 3 - local/lookup-server.lua | 2 - local/ls-project.lua | 3 - local/new-source.lua | 2 - local/playground.lua | 3 - local/policy.lua | 5 - 30 files changed, 4 insertions(+), 348 deletions(-) delete mode 100644 doc/man/e2hooks.7 delete mode 100644 generic/e2hook.lua diff --git a/doc/man/Makefile b/doc/man/Makefile index ab94c91..3064173 100644 --- a/doc/man/Makefile +++ b/doc/man/Makefile @@ -48,7 +48,7 @@ e2.conf.5 \ e2-build-numbers.1 MANPAGES5 = e2rc.5 e2config.5 -MANPAGES7 = e2global.7 e2hooks.7 e2intro.7 e2workflow.7 +MANPAGES7 = e2global.7 e2intro.7 e2workflow.7 MANPAGES = $(MANPAGES1) $(MANPAGES5) $(MANPAGES7) MANPAGES_HTML = $(MANPAGES:=.html) diff --git a/doc/man/e2-build.1 b/doc/man/e2-build.1 index cb2ec95..43c2d7a 100644 --- a/doc/man/e2-build.1 +++ b/doc/man/e2-build.1 @@ -16,7 +16,6 @@ dependencies are taken into account. Depending on the intended outcome, different versions of the source files to use may be retrieved for the build process. See \fBe2config\fR for a description of the source config file format. -Invokes the hooks "pre-build" and "post-build". .SH RETURN VALUE Normally, exit status is 0. On error, it is non-zero. @@ -87,7 +86,6 @@ Doubtless there are many. .BR e2-ls-project (1), .BR e2-playground (1), .BR e2config (5), -.BR e2hooks (7), .BR e2-sync-results (1), .BR e2-runbuild (1). diff --git a/doc/man/e2-buildid.1 b/doc/man/e2-buildid.1 index 9de66d3..27d36eb 100644 --- a/doc/man/e2-buildid.1 +++ b/doc/man/e2-buildid.1 @@ -31,7 +31,6 @@ The algorithm for the build id is as follows: for f in {proj/chroot, proj/env, proj/init/*, - proj/hooks/*, res/result/build-script, res/result/config:files } sha1sum(f), diff --git a/doc/man/e2-create-project.1 b/doc/man/e2-create-project.1 index efb5af6..3df5387 100644 --- a/doc/man/e2-create-project.1 +++ b/doc/man/e2-create-project.1 @@ -16,7 +16,6 @@ Create a new project and store it on in . The project name will be the basename of . The usual project location convention is \fBprojects:/\fR. -e2-create-project invokes the "create-project" hook. .SH RETURN VALUE Normally, exit status is 0. On error, it is non-zero. @@ -42,7 +41,6 @@ Doubtless there are many. .BR e2-fetch-sources(1) .BR e2-ls-project(1) .BR e2config(5) -.BR e2hooks(7) .SH AUTHORS Gordon Hecker, Oskar Schirmer and Felix Winkelmann diff --git a/doc/man/e2-fetch-project.1 b/doc/man/e2-fetch-project.1 index 4897060..349b086 100644 --- a/doc/man/e2-fetch-project.1 +++ b/doc/man/e2-fetch-project.1 @@ -14,7 +14,6 @@ e2-fetch-project [OPTION]... PATH [DESTINATION] \fBe2-fetch-project\fR clones a project repository designated by "PATH", which should be the absolute path to a \fBe2(7)\fR project. The usual project path convention is \fB///\fR. -Invokes the "fetch-project" hook. .SH RETURN VALUE Normally, exit status is 0. On error, it is non-zero. @@ -47,7 +46,6 @@ Doubtless there are many. .BR e2-fetch-sources(1) .BR e2-ls-project(1) .BR e2config(5) -.BR e2hooks(7) .SH AUTHORS Gordon Hecker, Oskar Schirmer and Felix Winkelmann diff --git a/doc/man/e2-fetch-sources.1 b/doc/man/e2-fetch-sources.1 index ffc6d7f..a86e773 100644 --- a/doc/man/e2-fetch-sources.1 +++ b/doc/man/e2-fetch-sources.1 @@ -14,8 +14,7 @@ e2-fetch-sources [OPTION|SOURCE|RESULT ...] \fBe2-fetch-sources\fR retrieves sources for project results. Sources can be either specified through the source- or result names. For sources stored in version-controlled repositories, the associated repositories will be -cloned and a project-local working copy created. Invokes the -"fetch-sources" hook. +cloned and a project-local working copy created. Note, that sources of type \fIfiles\fR are not fetched. @@ -51,7 +50,6 @@ Doubtless there are many. .BR e2intro (7), .BR e2-ls-project (1), .BR e2config (5), -.BR e2hooks (7). .SH AUTHORS Gordon Hecker, Oskar Schirmer and Felix Winkelmann diff --git a/doc/man/e2-playground.1 b/doc/man/e2-playground.1 index 3e16629..43d8749 100644 --- a/doc/man/e2-playground.1 +++ b/doc/man/e2-playground.1 @@ -15,7 +15,6 @@ e2-playground OPTION|RESULT ... \fBe2-playground\fR enters a \fBchroot\fR(1) environment previously created by running \fBe2-build\fR with the "--playground" option, or one that is left over from a previous (possibly failed) build. -Calls the "enter-playground" hook. .SH RETURN VALUE Normally, exit status is 0. On error, it is non-zero. @@ -42,7 +41,6 @@ Doubtless there are many. .BR e2-ls-project (1), .BR e2-build (1), .BR e2config (5), -.BR e2hooks (7). .SH AUTHORS Gordon Hecker, Oskar Schirmer and Felix Winkelmann diff --git a/doc/man/e2config.5 b/doc/man/e2config.5 index 77de841..6c862cd 100644 --- a/doc/man/e2config.5 +++ b/doc/man/e2config.5 @@ -21,7 +21,6 @@ sub-directories: | |-- chroot required chroot tarballs | |-- default-results main final results of the project | |-- init initialization scripts run inside chroot -| |-- hooks hook scripts for customization (optional) | |-- licences list of licences used by sources (optional) | |-- name project name | |-- result-storage where to store shared build-results diff --git a/doc/man/e2hooks.7 b/doc/man/e2hooks.7 deleted file mode 100644 index 90e14b4..0000000 --- a/doc/man/e2hooks.7 +++ /dev/null @@ -1,183 +0,0 @@ -.\" Man page for e2 hooks -.\" -.\" (c)2007 emlix GmbH -.\" -.TH e2hook 7 "Aug 2, 2007" "0.1" - -.SH NAME -e2hooks \- Hooks available in the e2 build system - -.SH DESCRIPTION -During execution of \fBe2\fR commands a number of "hook" scripts are -called, if available, to perform any site-specific customization of -the build process. Hook scripts are located in the "hooks" -subdirectory of the project and will be loaded and evaluated as Lua -code. Global tools do not nocessarily execute in a project directory -and will load and evaluate hooks in the \fB$HOME/.e2/hooks\fR -directory, if it exists. Hook-specific arguments are passed as a table -in the global "e2hook" table under the key "arguments". The project -info structure (not necessarily complete) is stored under the key -"info" in the "e2hook" table. Finally, the name of the currently -invoked tool can be found under "toolname" in the said table. - -Note, that hooks are not intended to add functionality changing the -build process itself. It is an error to let a hook do anything that -changes the outcome of the build process. Instead, hooks may be used -to trigger actions in the environment of the build process. - -.SH HOOKS - -.TP -.BR tool\-start -Called when a local tool executes (after command-line processing, but -before the actual operations begin). Note that the \fBe2hook.info\fR -entry may be \fBnil\fR if this hook is triggered in a global tool. - -.TP -.BR tool\-finish -Called after a local tool executed without an error. If an error -occurred, this hook will not run. Note that the \fBe2hook.info\fR -entry may be \fBnil\fR if this hook is triggered in a global tool. - -.TP -.BR pre\-build -Called before an \fBe2-build(1)\fR command commences. Arguments are -given in a table with the following keys: - -.nf - info = - result = - tags = - heads = - playground = -.fi - -.TP -.BR post\-build -Called after \fBe2-build(1)\fR finishes, with the same arguments as -"pre-build". - -.TP -.BR build\-setup\-chroot -Called after the chroot(1) environment has been set up for building a -single result. The argument is a build configuration table. - -.TP -.BR build\-pre\-runbuild -Called before starting the actual build-script inside the chroot(1) -environment for a single result. The argument is the build configuration table. - -.TP -.BR build\-post\-runbuild -Called after the build-script of a single result has completed. Argument -is the build configuration table. - -.TP -.BR build\-remove\-chroot -Called before the chroot(1) environment for a single result is removed. -Argument is the build configuration table. - -.TP -.BR build\-pre\-sources -Called before the sources are applied into the chroot(1) environment for -a single result. Argument is the build configuration table. - -.TP -.BR build\-post\-sources -Called after the sources have been applied into the chroot(1) environment. - -.TP -.BR build\-failure -Called when the build script of a result fails. Argument is the build -configuration table. - -.TP -.BR files\-prepare\-source -Called once after preparing each single source file for files sources. -The argument table carries the entries \fBsource\fR (source name), -\fBfile\fR (file name) and \fBpath\fR (build path). - -.TP -.BR build\-pre\-result -Called before a single result is build. Argument is the build configuration -table. - -.TP -.BR build\-post\-result -Called after a single result is build. Argument is the build configuration -table. - -.TP -.BR create\-project -Called after a base project has been cloned by \fBe2-create-project(1)\fR -and before it is stored on the project server. -The argument is the root path of the project. The "info" entry in -the "e2hook" table is incomplete for this hook. - -.TP -.BR fetch\-project -Called after fetching a project with \fBe2-fetch-project(1)\fR. The argument -is the root path of the project. The "info" entry in -the "e2hook" table is incomplete for this hook. - -.TP -.BR fetch\-sources -Called after fetching sources with \fBe2-fetch-sources(1)\fR. The argument -is a table containing the requested sources. - -.TP -.BR enter\-playground -Called before entering a chroot(1) environment via \fBe2-playground(1)\fR. -The argument is the path where the chroot environment is located. - -.TP -.BR use\-source -Called after a new source is inserted into an existing project by -\fBe2-use-source(1)\fR. The argument is a table with the following entries: - -.nf - type = - server = - remote = - working = - branch = - tag = -.fi - -.SH "HOOK ORDER" -Build-related hooks are run in the following order: - -.nf - pre-build - build-pre-result (once for each result) - build-setup-chroot - build-pre-sources - build-post-sources - build-pre-runbuild - build-post-runbuild - build-post-result - build-remove-chroot - post-build -.fi - -.SH BUGS - -When \fBe2-new-source\fR is invoked without the \fB--source\fR option, -then the \fBtool-start\fR and \fBtool-finish\fR hooks will not execute. - -Doubtless there are many others. - -.SH "SEE ALSO" -.BR e2intro(7) -.BR e2-build(1) -.BR e2-create-project(1) -.BR e2-fetch-project(1) -.BR e2-fetch-sources(1) -.BR e2-playground(1) -.BR e2-use-source(1) - -.SH AUTHORS -Gordon Hecker, Oskar Schirmer and Felix Winkelmann - -.SH COPYRIGHT -(c)2007 emlix GmbH diff --git a/doc/man/e2intro.7 b/doc/man/e2intro.7 index d5da2dd..796faa9 100644 --- a/doc/man/e2intro.7 +++ b/doc/man/e2intro.7 @@ -147,7 +147,6 @@ set ssh options when using the \fBe2ssh\fR(1) \fBssh\fR wrapper. .BR e2-new-source(1) .BR e2-create-project(1) .BR e2config(5) -.BR e2hooks(7) .BR e2-sync-results(1) .BR e2global(1) .BR e2-install-e2(1) diff --git a/generic/Makefile b/generic/Makefile index 9d8b313..1bc2783 100644 --- a/generic/Makefile +++ b/generic/Makefile @@ -74,14 +74,14 @@ clean: rm -f $(CLEAN_FILES) e2generic_global.lc: strict.lua collection.lua e2lib_global_prefix.lua \ - e2lib.lua e2hook.lua e2option.lua sha1.lua \ + e2lib.lua e2option.lua sha1.lua \ transport.lua cache.lua url.lua scm.git.lua \ convenience.lua luafile.lua lua-version-map.lua \ error.lua $(BUILD_LUAC) -o $@ $^ e2generic_local.lc: strict.lua collection.lua e2lib_local_prefix.lua \ - e2lib.lua e2hook.lua e2option.lua sha1.lua \ + e2lib.lua e2option.lua sha1.lua \ transport.lua cache.lua url.lua scm.git.lua \ convenience.lua luafile.lua lua-version-map.lua $(LUAC) -o $@ $^ diff --git a/generic/e2hook.lua b/generic/e2hook.lua deleted file mode 100644 index 9928bce..0000000 --- a/generic/e2hook.lua +++ /dev/null @@ -1,83 +0,0 @@ ---[[ - e2factory, the emlix embedded build system - - Copyright (C) 2007-2009 Gordon Hecker , emlix GmbH - Copyright (C) 2007-2009 Oskar Schirmer , emlix GmbH - Copyright (C) 2007-2008 Felix Winkelmann, emlix GmbH - - For more information have a look at http://www.e2factory.org - - e2factory is a registered trademark by emlix GmbH. - - This file is part of e2factory, the emlix embedded build system. - - e2factory is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . -]] - -e2hook = e2lib.module("e2hook") - -e2hook.hooks = {} - -local hooks = { - "tool-start", - "tool-finish", - "pre-build", - "post-build", - "create-project", - "fetch-project", - "fetch-sources", - "enter-playground", - "use-source", - "build-setup-chroot", - "build-pre-runbuild", - "build-post-runbuild", - "build-remove-chroot", - "build-pre-sources", - "build-post-sources", - "build-pre-result", - "build-post-result", - "files-prepare-source", - "build-failure", -} - -for _, k in pairs(hooks) do - e2hook.hooks[ k ] = true -end - -e2hook.info = nil -e2hook.arguments = nil - -function e2hook.log(msg) - e2lib.log(3, "[hook: " .. e2hook.hookname .. "] " .. msg) -end - -function e2hook.run_hook(info, hookname, arguments, toolname) - if not e2hook.hooks[ hookname ] then - e2lib.bomb("invalid hook: ", hookname) - end - local hfile - if info then - hfile = info.root .. "/proj/hooks/" .. hookname - else - hfile = buildconfig.PREFIX .. "/share/e2/hooks/" .. hookname - end - if e2util.exists(hfile) then - e2lib.log(3, "running hook `" .. hookname .. "' ...") - e2hook.arguments = arguments - e2hook.hookname = hookname - e2hook.info = info or {} - e2hook.toolname = toolname - dofile(hfile) - end -end diff --git a/generic/e2lib.lua b/generic/e2lib.lua index 05477fd..fde4356 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -69,7 +69,6 @@ e2lib = { termwidth = 72, env = {}, last_output = false, - abort_hook = false, tmpdirs = {}, tmpfiles = {}, enable_invocation_log = false, @@ -262,18 +261,12 @@ function e2lib.abort(...) local t = { ... } local e = t[1] if e and e.print then - if e2lib.abort_hook then - e2lib.abort_hook("no message") - end e:print() else local msg = table.concat(t) if msg:len() == 0 then e2lib.bomb("calling e2lib.abort() with zero length message") end - if e2lib.abort_hook then - e2lib.abort_hook(msg) - end e2lib.log(1, "Error: " .. msg) end e2lib.rmtempdirs() diff --git a/global/e2-create-project.lua.in b/global/e2-create-project.lua.in index 48ea4ac..a6cb563 100755 --- a/global/e2-create-project.lua.in +++ b/global/e2-create-project.lua.in @@ -61,8 +61,6 @@ e2lib.log_invocation(nil, arg) -- standard global tool setup finished ---e2hook.run_hook(nil, "tool-start", nil, "e2-create-project") - if e2lib.osenv["E2_LOCAL_TAG"] and e2lib.osenv["E2_LOCAL_BRANCH"] then e2lib.local_e2_branch = e2lib.osenv["E2_LOCAL_BRANCH"] e2lib.local_e2_tag = e2lib.osenv["E2_LOCAL_TAG"] diff --git a/global/e2-fetch-project.lua.in b/global/e2-fetch-project.lua.in index d108888..63c9853 100755 --- a/global/e2-fetch-project.lua.in +++ b/global/e2-fetch-project.lua.in @@ -65,8 +65,6 @@ e2lib.log_invocation(nil, arg) -- standard global tool setup finished ---e2hook.run_hook(nil, "tool-start", nil, "e2-fetch-project") - if #opts.arguments < 1 then e2lib.abort("specify path to a project to fetch") end diff --git a/global/e2-install-e2.lua.in b/global/e2-install-e2.lua.in index 69a69f8..bc3fe1f 100755 --- a/global/e2-install-e2.lua.in +++ b/global/e2-install-e2.lua.in @@ -65,8 +65,6 @@ e2lib.log_invocation(nil, arg) -- standard global tool setup finished ---e2hook.run_hook(nil, "tool-start", nil, "e2-install-e2") - if #opts.arguments > 0 then e2option.usage(1) end diff --git a/local/Makefile b/local/Makefile index cd878d0..a5670d4 100644 --- a/local/Makefile +++ b/local/Makefile @@ -117,7 +117,6 @@ e2local.lc: $(TOPLEVEL)/generic/strict.lua \ $(TOPLEVEL)/generic/url.lua \ $(TOPLEVEL)/generic/collection.lua \ $(TOPLEVEL)/generic/e2lib.lua \ - $(TOPLEVEL)/generic/e2hook.lua \ e2tool.lua e2scm.lua git.lua svn.lua cvs.lua files.lua \ $(TOPLEVEL)/generic/e2option.lua \ $(TOPLEVEL)/generic/convenience.lua \ diff --git a/local/build-numbers.lua b/local/build-numbers.lua index d685c5f..60f6c6d 100755 --- a/local/build-numbers.lua +++ b/local/build-numbers.lua @@ -59,7 +59,6 @@ for _,res in pairs(info.results) do end e2lib.log_invocation(info, arg) -e2hook.run_hook(info, "tool-start", nil, "e2-buildnumbers") -- read build numbers, -- merge to results, diff --git a/local/build.lua b/local/build.lua index 90e6813..177da3c 100755 --- a/local/build.lua +++ b/local/build.lua @@ -57,7 +57,6 @@ if not rc then end e2lib.log_invocation(info, arg) -e2hook.run_hook(info, "tool-start", nil, "e2-build") -- get build mode from the command line local build_mode = policy.handle_commandline_options(opts, true) @@ -133,7 +132,6 @@ end if opts.release and not e2tool.e2_has_fixed_tag(info) then e2lib.abort("Failure: e2 is on pseudo tag while building in release mode.") end --- XXX e2hook.run_hook(info, "pre-build", a, "e2-build") if opts["buildnumber"] then e2lib.logf(1, "setting up build numbers") @@ -163,7 +161,5 @@ local rc, re = e2build.build_results(info, sel_res) if not rc then e2lib.abort(re) end --- XXX e2hook.run_hook(info, "post-build", a, "e2-build") -e2hook.run_hook(info, "tool-finish", nil, "e2-build") e2lib.finish() diff --git a/local/dlist.lua b/local/dlist.lua index f5d410b..d475a32 100755 --- a/local/dlist.lua +++ b/local/dlist.lua @@ -50,7 +50,6 @@ if not info then end e2lib.log_invocation(info, arg) -e2hook.run_hook(info, "tool-start", nil, "e2-dlist") if not info.results[ result ] then e2lib.abort("no such result: ", result) @@ -64,6 +63,5 @@ if dep then for i = 1, #dep do print(dep[i]) end end -e2hook.run_hook(info, "tool-finish", nil, "e2-dlist") e2lib.finish() diff --git a/local/dsort.lua b/local/dsort.lua index 501dbf4..8b17b1a 100755 --- a/local/dsort.lua +++ b/local/dsort.lua @@ -44,13 +44,11 @@ if not info then end e2lib.log_invocation(info, arg) -e2hook.run_hook(info, "tool-start", nil, "e2-dsort") local d = e2tool.dsort(info) if d then for i = 1, #d do print(d[i]) end end -e2hook.run_hook(info, "tool-finish", nil, "e2-dsort") e2lib.finish() diff --git a/local/e2build.lua b/local/e2build.lua index 0b75bad..12da055 100644 --- a/local/e2build.lua +++ b/local/e2build.lua @@ -347,12 +347,10 @@ function e2build.runbuild(info, r, return_flags) e2tool.reset_umask(info) out:close() if rc ~= 0 then - -- XXX e2hook.run_hook(c.info, "build-failure", c, "e2-build") e = new_error("build script for %s failed with exit status %d", r, rc) e:append("see %s for more information", res.build_config.buildlog) return false, e end - -- XXX e2hook.run_hook(c.info, "build-post-runbuild", c, "e2-build") return true, nil end @@ -601,7 +599,6 @@ function e2build.sources(info, r, return_flags) end local steps = { - --XXX e2hook.run_hook(c.info, "build-pre-sources", c, "e2-build") install_directory_structure, install_build_script, install_env, @@ -609,7 +606,6 @@ function e2build.sources(info, r, return_flags) install_build_driver, install_build_time_dependencies, install_sources, - --XXX e2hook.run_hook(c.info, "build-post-sources", c, "e2-build") } for _,f in ipairs(steps) do local rflags = {} diff --git a/local/e2tool.lua b/local/e2tool.lua index 8bf24ff..75a9b8f 100644 --- a/local/e2tool.lua +++ b/local/e2tool.lua @@ -435,9 +435,6 @@ The newest configuration syntax supported by the tools is %s. if not rc then return false, e:cat(re) end - -- do not set this metatable here, as we want to allow changing - -- the environment in a hook... - --setmetatable(info.env, { __newindex = invalid_access }) end -- read project configuration @@ -1060,19 +1057,6 @@ function e2tool.projid(info) hc:hash_line(hash) -- the file content end end - for f in e2lib.directory(info.root .. "/proj/hooks", false, true) do - if not e2lib.is_backup_file(f) then - local location = string.format("proj/hooks/%s", - e2lib.basename(f)) - local hash, e = e2tool.hash_file(info, - info.root_server_name, location) - if not hash then - e2lib.abort(e) - end - hc:hash_line(location) -- the file location - hc:hash_line(hash) -- the file content - end - end hc:hash_line(info.release_id) hc:hash_line(info.project.chroot_arch) hc:hash_line(buildconfig.VERSION) diff --git a/local/fetch-sources.lua b/local/fetch-sources.lua index 8c689f4..c10560f 100755 --- a/local/fetch-sources.lua +++ b/local/fetch-sources.lua @@ -75,7 +75,6 @@ if not rc then end e2lib.log_invocation(info, arg) -e2hook.run_hook(info, "tool-start", nil, "e2-fetch-sources") if not (opts.fetch or opts.update) then opts.fetch = true @@ -245,9 +244,6 @@ if opts.scm or opts.files or opts.git or opts.cvs or opts.svn or end end ---e2hook.run_hook(info, "fetch-sources", srcs) ---e2hook.run_hook(info, "tool-finish", nil, "e2-fetch-sources") - if e:getcount() > 0 then e2lib.abort(e) end diff --git a/local/files.lua b/local/files.lua index 090c707..700e46e 100644 --- a/local/files.lua +++ b/local/files.lua @@ -296,9 +296,6 @@ function files.prepare_source(info, sourcename, sourceset, buildpath) file.location, file.server)) end end - e2hook.run_hook(info, "files-prepare-source", - {source=sourcename, file=file.base, path=buildpath}, - "e2-build") end return true, nil end diff --git a/local/lookup-server.lua b/local/lookup-server.lua index cbf6c24..19a8830 100755 --- a/local/lookup-server.lua +++ b/local/lookup-server.lua @@ -44,11 +44,9 @@ if not info then end e2lib.log_invocation(info, arg) -e2hook.run_hook(info, "tool-start", nil, "e2-lookup-server") local server, islocal = e2tool.lookup_server(info, opts.arguments[1]) if not server then e2options.usage(1) end print(server) -e2hook.run_hook(info, "tool-finish", nil, "e2-lookup-server") e2lib.finish() diff --git a/local/ls-project.lua b/local/ls-project.lua index dff86db..3c67d76 100755 --- a/local/ls-project.lua +++ b/local/ls-project.lua @@ -53,7 +53,6 @@ if not rc then end --e2lib.log_invocation(info, arg) -e2hook.run_hook(info, "tool-start", nil, "e2-ls-project") local function pempty(s1, s2, s3) print(string.format(" %s %s %s", s1, s2, s3)) @@ -142,7 +141,6 @@ if opts.dot or opts["dot-sources"] then end print("}") e2lib.finish() - e2hook.run_hook(info, "tool-finish", nil, "e2-ls-project") end --------------- project name @@ -265,5 +263,4 @@ for _,g in ipairs(info.chroot.groups_sorted) do end end -e2hook.run_hook(info, "tool-finish", nil, "e2-ls-project") e2lib.finish() diff --git a/local/new-source.lua b/local/new-source.lua index 533cf65..cbb1c46 100644 --- a/local/new-source.lua +++ b/local/new-source.lua @@ -243,7 +243,6 @@ if not info then end e2lib.log_invocation(info, arg) -e2hook.run_hook(info, "tool-start", nil, "e2-new-source") if opts.git then if #opts.arguments ~= 1 then @@ -291,5 +290,4 @@ else "sources in your project") end -e2hook.run_hook(info, "tool-finish", nil, "e2-new-source") e2lib.finish(0) diff --git a/local/playground.lua b/local/playground.lua index f55fb37..01c854c 100644 --- a/local/playground.lua +++ b/local/playground.lua @@ -53,7 +53,6 @@ if not rc then end e2lib.log_invocation(info, arg) -e2hook.run_hook(info, "tool-start", nil, "e2-playground") if #opts.arguments ~= 1 then e2option.usage(1) @@ -61,7 +60,6 @@ end r = opts.arguments[1] ---e2hook.run_hook(info, "enter-playground", c.c "e2-playground") -- get build mode from the command line local build_mode = policy.handle_commandline_options(opts, true) if not build_mode then @@ -116,5 +114,4 @@ rc, re = e2build.enter_playground(info, r, command) if not rc then e2lib.abort(re) end ---e2hook.run_hook(info, "tool-finish", nil, "e2-playground") e2lib.finish() diff --git a/local/policy.lua b/local/policy.lua index 20009a9..3cd351c 100644 --- a/local/policy.lua +++ b/local/policy.lua @@ -224,20 +224,15 @@ local default_build_process = { "remove_logfile", "chroot_cleanup_if_exists", "setup_chroot", - -- XXX run build-setup-chroot hook here "sources", "collect_project", - -- XXX run build-pre-runbuild hook here -- XXX to be done: e2build.playground: stop if playgrund requested "fix_permissions", "playground", "runbuild", - -- XXX how to handle the build failure hook? - -- XXX run build-post-runbuild hook here "store_result", "linklast", "chroot_cleanup", - -- XXX run build-remove-chroot hook here? } policy = {} -- 2.39.5