]> git.e2factory.org Git - e2factory.git/commitdiff
remove all hook related code. The hook feature was not supported any more
authorGordon Hecker <gh@emlix.com>
Fri, 19 Jun 2009 15:23:31 +0000 (17:23 +0200)
committerGordon Hecker <gh@emlix.com>
Fri, 19 Jun 2009 15:24:13 +0000 (17:24 +0200)
and will be replaced by plugin support soon.

Signed-off-by: Gordon Hecker <gh@emlix.com>
30 files changed:
doc/man/Makefile
doc/man/e2-build.1
doc/man/e2-buildid.1
doc/man/e2-create-project.1
doc/man/e2-fetch-project.1
doc/man/e2-fetch-sources.1
doc/man/e2-playground.1
doc/man/e2config.5
doc/man/e2hooks.7 [deleted file]
doc/man/e2intro.7
generic/Makefile
generic/e2hook.lua [deleted file]
generic/e2lib.lua
global/e2-create-project.lua.in
global/e2-fetch-project.lua.in
global/e2-install-e2.lua.in
local/Makefile
local/build-numbers.lua
local/build.lua
local/dlist.lua
local/dsort.lua
local/e2build.lua
local/e2tool.lua
local/fetch-sources.lua
local/files.lua
local/lookup-server.lua
local/ls-project.lua
local/new-source.lua
local/playground.lua
local/policy.lua

index ab94c912bc9846285290c9c3b809072e0b1ec37d..306417367585051d6ac230ca80eb724966d0d947 100644 (file)
@@ -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)
index cb2ec95734cee21abe38d0a9df5a50e4d9e985c4..43c2d7a312b15be14e6fc8a2d7c05d23fc16f341 100644 (file)
@@ -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).
 
index 9de66d3d0302a2816b492c50e5a3c722a796bf07..27d36eb22e6d9484097eee9964a36cec4d8a355b 100644 (file)
@@ -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),
index efb5af672c03e9394092773be046cd7d111db809..3df53870d3e5c7ebfbeeb6554d7487b0f8e9e36e 100644 (file)
@@ -16,7 +16,6 @@ Create a new project and store it on <server> in <location>.
 The project name will be the basename of <location>.
 The usual project location convention is
 \fBprojects:<customer>/<projectname>\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
index 4897060437ceadd53026d0459bd6a95d23bfe561..349b08623660b1bcdfedcbf28212f5fc457b39ed 100644 (file)
@@ -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/<server-project-dir>/<customer>/<projectname>\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
index ffc6d7fcc8743a8872fa1aaa76548c0754bd5fc8..a86e773fd8ce76c84a35fe06df527707eeec849a 100644 (file)
@@ -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
index 3e16629b1006f6b1e6148bef83ef0c50385cc5b1..43d87496437d24aa390ff57000ca32ea9a04b064 100644 (file)
@@ -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
index 77de84103fce1be1a40f0ae674daca51c001c61c..6c862cd0092cbfe2633c4586cd3dcbcdb878e58b 100644 (file)
@@ -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 (file)
index 90e14b4..0000000
+++ /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 = <project info structure>
-  result = <table of results>
-  tags = <bool>
-  heads = <bool>
-  playground = <resultname or false>
-.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 = <source type string>
-  server = <server name>
-  remote = <server path>
-  working = <working directory>
-  branch = <branch name>
-  tag = <tag name>
-.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
index d5da2dd2a81e9cd71b9ea030e0f547f7cec2fea6..796faa9e394681dc177fd4ebb339c9d7aa1d348e 100644 (file)
@@ -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)
index 9d8b3139ca4d20b9e822394bb4c16b5fc73f4172..1bc2783795d3342920afde4993096b672e4b6136 100644 (file)
@@ -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 (file)
index 9928bce..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
---[[
-   e2factory, the emlix embedded build system
-
-   Copyright (C) 2007-2009 Gordon Hecker <gh@emlix.com>, emlix GmbH
-   Copyright (C) 2007-2009 Oskar Schirmer <os@emlix.com>, 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 <http://www.gnu.org/licenses/>.
-]]
-
-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
index 05477fdb8316d8320d064c1c2fc3aa70630f865d..fde43561d6be780e7fd30dd3cf7a8ec3eb289380 100644 (file)
@@ -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()
index 48ea4acaaabb42402c85fc2df5c842b9494a33ab..a6cb56368db972cced3e74c84baec9fd7602cf25 100755 (executable)
@@ -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"]
index d1088887495c0e2564d2eebe33c197e04d05b76c..63c9853afd504144312da52f7f9175f65eeaf15f 100755 (executable)
@@ -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
index 69a69f856704f43805c8909d7ee2c380079272f5..bc3fe1fc56736f27af753b9d43a05b307427043e 100755 (executable)
@@ -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
index cd878d094e26f482432ea996a7343734a9864e27..a5670d47864433bd7ed9325386a0db11ab13f42d 100644 (file)
@@ -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 \
index d685c5f6b483aa513ab28fa3e2dc22dacb5dee2a..60f6c6d88b02bfc82fc34e06126f6ef6ca41d37f 100755 (executable)
@@ -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,
index 90e6813d30dbb0376ee01bbfd2a47ac4a8dc2eb2..177da3c9a1030af5608283976b56db5b82262dfb 100755 (executable)
@@ -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()
 
index f5d410bd340b0007ea8af25efcfe9a5b415957b5..d475a32a50da0fa6ebc7945a96276c0a5bdbb74a 100755 (executable)
@@ -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()
 
index 501dbf4f7ec93137a160248705f6c9f8c321803e..8b17b1a24fe08316e374408c775dffb60ec62d24 100755 (executable)
@@ -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()
 
index 0b75badda075da8999c04bb1c843c623c215008a..12da05541c57e0d9bc227edc3cf7a25095d9728b 100644 (file)
@@ -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 = {}
index 8bf24ff24d5d54c03aac0134ce8f103113332896..75a9b8f8c0e9d0a78baafb494b43668a01ab41a8 100644 (file)
@@ -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)
index 8c689f425c957e9dc5b45d8478353d7ca0a1cfc7..c10560f7d667e5341aabbc01a2ffddc20238f43f 100755 (executable)
@@ -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
index 090c707a354475243c1ea4628569d12f4ced29cf..700e46e19566ce62e67c0371a6e99c8c65f50b2e 100644 (file)
@@ -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
index cbf6c2425d111442f4ef12156eceaa30075e47c2..19a8830a7f27f9000c9a31d1031f0aed10a79a3b 100755 (executable)
@@ -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()
index dff86db99e08c36abd4e71609a4d61b2c9c85bcb..3c67d767d4e6eaf770838710c022b19227c34d6a 100755 (executable)
@@ -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()
index 533cf650acaa73e31deda7a107ce4bb1130adb91..cbb1c465c9c1f8c7568af8268aee4995bf0fae14 100644 (file)
@@ -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)
index f55fb379485d4da17f947a1d7a3e93226816e0af..01c854c83f684024a02dd9e5e65692eccd5d8a12 100644 (file)
@@ -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()
index 20009a9eaf88d8932c5b04270be949f443ed4961..3cd351c3d9c7f97dbe5b2abaabbf0dce45bc9c86 100644 (file)
@@ -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 = {}