From 6d2d1a5bb195f94fd0c8e88a1dcd5b350a034959 Mon Sep 17 00:00:00 2001 From: Gordon Hecker Date: Wed, 10 Mar 2010 18:56:34 +0100 Subject: [PATCH] plugin interface: extensions * permit plugins to register commandline options * permit tool specific initialization of plugins Signed-off-by: Gordon Hecker --- Changelog | 2 ++ local/build-numbers.lua | 6 +++++- local/build.lua | 6 +++++- local/cf.lua | 6 +++++- local/dlist.lua | 6 +++++- local/dsort.lua | 6 +++++- local/e2build.lua | 31 ++++++++++++++++++++++++++++++- local/e2tool.lua | 21 ++++++++++++++++++--- local/fetch-sources.lua | 6 +++++- local/ls-project.lua | 6 +++++- local/new-source.lua | 6 +++++- local/playground.lua | 6 +++++- 12 files changed, 95 insertions(+), 13 deletions(-) diff --git a/Changelog b/Changelog index 2b6d3e0..73aa093 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,6 @@ NEXT: + * the plugin interface was extended to permit plugins to register + commandline options and permit tool specific initialization of plugins * a serious bug in the hashcache was fixed. The buildid calculation used outdated hash of files from the project tree. * the username is included in the chroot environment path again diff --git a/local/build-numbers.lua b/local/build-numbers.lua index 36b07cc..944b744 100755 --- a/local/build-numbers.lua +++ b/local/build-numbers.lua @@ -30,6 +30,10 @@ require("e2local") require("e2tool") e2lib.init() +local info, re = e2tool.local_init(nil, "build-numbers") +if not info then + e2lib.abort(re) +end e2option.documentation = [[ usage: @@ -45,7 +49,7 @@ local build_mode = policy.handle_commandline_options(opts, true) if not build_mode then e2lib.abort("no build mode given") end -local info, re = e2tool.collect_project_info() +info, re = e2tool.collect_project_info(info) if not info then e2lib.abort(re) end diff --git a/local/build.lua b/local/build.lua index 6f41cc9..1eb1e89 100755 --- a/local/build.lua +++ b/local/build.lua @@ -31,6 +31,10 @@ require("e2local") require("e2tool") require("e2build") e2lib.init() +local info, re = e2tool.local_init(nil, "build") +if not info then + e2lib.abort(re) +end e2option.documentation = [[ usage: e2-build [