From: Tobias Ulmer Date: Fri, 10 Aug 2012 07:30:30 +0000 (+0200) Subject: Remove e2local and compiled lua libs X-Git-Tag: e2factory-2.3.13rc1~175 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=e278414e5ecd2a4e0a7e80be9ad991937df0efb4;p=e2factory.git Remove e2local and compiled lua libs Finally get rid of compiled lua libs, an artifact from the past. Also remove the confusion around "e2local" which was just e2lib and other modules bunched together in the past. Following the removal of e2local, we can also get rid of loading compiled lua bytecode, except where needed for backwards compatibility. Signed-off-by: Tobias Ulmer --- diff --git a/.gitignore b/.gitignore index 4744a51..767d5b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ *~ *.so -*.lc tags diff --git a/example/Makefile b/example/Makefile index f0875b6..16eb5bd 100644 --- a/example/Makefile +++ b/example/Makefile @@ -29,7 +29,7 @@ TOPLEVEL = .. include $(TOPLEVEL)/make.vars -CLEAN_FILES = *~ *.lc *.so +CLEAN_FILES = *~ *.so DOWNLOAD = http://www.e2factory.org/source/example E2FACTORY_GIT = http://git.e2factory.org/git/e2factory/e2factory.git diff --git a/generic/Makefile b/generic/Makefile index f5e5a2d..95c2e1c 100644 --- a/generic/Makefile +++ b/generic/Makefile @@ -32,7 +32,7 @@ TOPLEVEL = .. include $(TOPLEVEL)/make.vars -CLEAN_FILES = *~ *.lc *.o *.so +CLEAN_FILES = *~ *.o *.so .PHONY: all install uninstall local install-local clean diff --git a/global/Makefile b/global/Makefile index 2f13db3..167579b 100644 --- a/global/Makefile +++ b/global/Makefile @@ -35,7 +35,7 @@ SCRIPTS = GLOBALLUATOOLS = e2-create-project e2-fetch-project e2-install-e2 e2-root GLOBALSHTOOLS = e2-locate-project-root e2ssh GLOBALTOOLS = $(GLOBALLUATOOLS) $(GLOBALSHTOOLS) -CLEAN_FILES = *~ $(GLOBALTOOLS) *.lc e2 $(SCRIPTS) *.lua e2-su *.sh e2.conf +CLEAN_FILES = *~ $(GLOBALTOOLS) e2 $(SCRIPTS) *.lua e2-su *.sh e2.conf LUA_LIBS = strict.lua plugin.lua e2lib.lua LUA_LIBS += e2option.lua hash.lua tools.lua transport.lua cache.lua url.lua LUA_LIBS += generic_git.lua luafile.lua err.lua lock.lua @@ -43,7 +43,7 @@ LUA_LIBS += buildconfig.lua .PHONY: all install uninstall clean -all: e2 e2-root $(SCRIPTS) e2-su $(GLOBALLUATOOLS:=.lc) \ +all: e2 e2-root $(SCRIPTS) e2-su \ $(GLOBALSHTOOLS:=.sh) e2.conf sha1.so e2-su-2.2 \ luafile_ll.so e2util.so @@ -62,7 +62,7 @@ install-lua: $(LUA_LIBS) install: all install-dirs install-lua for i in $(GLOBALLUATOOLS) ; do \ - install -m 755 $$i.lc $(DESTDIR)$(TOOLDIR)/$$i ; \ + install -m 755 $$i.lua $(DESTDIR)$(TOOLDIR)/$$i ; \ ln -sf e2 $(DESTDIR)$(BINDIR)/$$i ; \ done for i in $(GLOBALSHTOOLS) ; do \ @@ -112,20 +112,17 @@ clean: %.lua: %.lua.in $(TOPLEVEL)/scripts/genscript.sh $< $@ -%.lc: %.lua - $(BUILD_LUAC) -o $@ $< - e2-su: e2-su.c $(CC) $(CFLAGS) $(CPPFLAGS) $< -o $@ %.sh: %.sh.in $(TOPLEVEL)/scripts/genscript.sh $< $@ -e2: e2.lc +e2: e2.lua echo "#!$(LIBEXECDIR)/e2-lua-$(LUA_VERSION)" >$@ cat $< >>$@ -e2-root: e2-root.lc +e2-root: e2-root.lua echo "#!$(LIBEXECDIR)/e2-lua-$(LUA_VERSION)" >$@ cat $< >>$@ diff --git a/global/e2-root.lua.in b/global/e2-root.lua.in index 10ef077..d72dae8 100644 --- a/global/e2-root.lua.in +++ b/global/e2-root.lua.in @@ -25,7 +25,7 @@ along with this program. If not, see . ]] -package.path = "@LIBDIR@/?.lc;@LIBDIR@/?.lua" +package.path = "@LIBDIR@/?.lua" package.cpath = "@LIBDIR@/?.so" env_tool = "@ENV_TOOL@" diff --git a/global/e2.lua.in b/global/e2.lua.in index da412af..5228eac 100644 --- a/global/e2.lua.in +++ b/global/e2.lua.in @@ -25,7 +25,7 @@ along with this program. If not, see . ]] -package.path = "@LIBDIR@/?.lc;@LIBDIR@/?.lua" +package.path = "@LIBDIR@/?.lua" package.cpath = "@LIBDIR@/?.so" require("buildconfig") @@ -82,9 +82,8 @@ end if e2util.stat(e2call.globaltool) then e2call.tool = e2call.globaltool - env = string.format("LUA_PATH='%s/?.lc;%s/?.lua' " .. - "LUA_CPATH='%s/?.so'", buildconfig.LIBDIR, buildconfig.LIBDIR, - buildconfig.LIBDIR) + env = string.format("LUA_PATH='%s/?.lua' LUA_CPATH='%s/?.so'", + buildconfig.LIBDIR, buildconfig.LIBDIR) lua = buildconfig.LUA cmd = string.format("%s %s %s %s", env, lua, e2call.tool, e2call.arg_string) elseif not root then @@ -92,6 +91,7 @@ elseif not root then " is not a global tool and we're not in a project environment") elseif root and e2util.stat(e2call.localtool) then e2call.tool = e2call.localtool + -- Search for .lc files, the local e2 may be of an older version env = "LUA_PATH='" .. root .. "/.e2/lib/e2/?.lc;" .. root .. "/.e2/lib/e2/?.lua' " .. "LUA_CPATH=" .. root .. "/.e2/lib/e2/?.so" diff --git a/local/Makefile b/local/Makefile index 005f237..2bf66fc 100644 --- a/local/Makefile +++ b/local/Makefile @@ -34,7 +34,7 @@ include $(TOPLEVEL)/make.vars VPATH = .:$(TOPLEVEL)/generic:$(TOPLEVEL) -CLEAN_FILES = *~ *.so linux32 *.lc *.o +CLEAN_FILES = *~ *.so linux32 *.o CFLAGS += -I. -I$(DESTDIR)$(INCDIR) -I$(DESTDIR)$(INCDIR)/lua-$(LUA_VERSION) \ -I../lua/lua-$(LUA_VERSION)/src -fPIC LDFLAGS += -L. -L../lua/lua-$(LUA_VERSION)/src -Wl,-R$(LIBDIR) @@ -56,7 +56,7 @@ SYMLINKS_2_1 = lookup-server use-source prepare-cargo sync-results cleanup \ .PHONY: all install uninstall install install-local doc install-doc -all: linux32 e2local.lc $(LOCALLUATOOLS:=.lc) sha1.so luafile_ll.so e2util.so +all: linux32 sha1.so luafile_ll.so e2util.so install: # install symlinks for e2-2.1 compatibility @@ -76,9 +76,8 @@ install-local-lua: $(LUA_LIBS) install-local: all install-local-dirs install-local-lua install-local-sourcefiles test -n "$(PROJECTDIR)" install -m 755 -d $(LOCALPLUGINDIR) - install -m644 e2local.lc $(LOCALLIBDIR)/ for i in $(LOCALLUATOOLS); do \ - install -m 755 $$i.lc $(LOCALBINDIR)/e2-$$i; \ + install -m 755 $$i.lua $(LOCALBINDIR)/e2-$$i; \ done for i in $(LOCALSHTOOLS); do \ install -m 755 $$i $(LOCALBINDIR)/e2-$$i; \ @@ -117,13 +116,6 @@ clean: %: %.in $(TOPLEVEL)/scripts/genscript.sh $< $@ -%.lc: %.lua - $(LUAC) -o $@ $< - -e2local.lc: \ - e2lib.lua - $(LUAC) -o $@ $^ - linux32: linux32.c sha1.so: sha1.o lsha1.o diff --git a/local/build-numbers.lua b/local/build-numbers.lua index 2c67265..6cf404f 100644 --- a/local/build-numbers.lua +++ b/local/build-numbers.lua @@ -27,7 +27,7 @@ -- e2-buildnumbers -*- Lua -*- -require("e2local") +require("e2lib") require("e2tool") e2lib.init() local info, re = e2tool.local_init(nil, "build-numbers") diff --git a/local/build.lua b/local/build.lua index 1719d27..e61f6b2 100644 --- a/local/build.lua +++ b/local/build.lua @@ -27,7 +27,7 @@ -- e2-build -*- Lua -*- -require("e2local") +require("e2lib") require("e2tool") require("e2build") local err = require("err") diff --git a/local/cf.lua b/local/cf.lua index ca36a31..c197ea9 100644 --- a/local/cf.lua +++ b/local/cf.lua @@ -27,7 +27,7 @@ -- e2-cf -*- Lua -*- -require("e2local") +require("e2lib") require("e2tool") local err = require("err") diff --git a/local/dlist.lua b/local/dlist.lua index a6a2dd2..d7935db 100644 --- a/local/dlist.lua +++ b/local/dlist.lua @@ -27,7 +27,7 @@ -- dlist - list sorted dependencies -*- Lua -*- -require("e2local") +require("e2lib") require("e2tool") require("e2build") e2lib.init() diff --git a/local/dsort.lua b/local/dsort.lua index 7585bdd..97e8ce1 100644 --- a/local/dsort.lua +++ b/local/dsort.lua @@ -27,7 +27,7 @@ -- dsort -*- Lua -*- -require("e2local") +require("e2lib") require("e2tool") require("e2build") e2lib.init() diff --git a/local/fetch-sources.lua b/local/fetch-sources.lua index c82a524..7f1cf42 100644 --- a/local/fetch-sources.lua +++ b/local/fetch-sources.lua @@ -27,7 +27,7 @@ -- fetch-sources - Retrieve sources for project -*- Lua -*- -require("e2local") +require("e2lib") require("e2tool") require("e2build") local err = require("err") diff --git a/local/ls-project.lua b/local/ls-project.lua index 60a372e..104e420 100644 --- a/local/ls-project.lua +++ b/local/ls-project.lua @@ -27,7 +27,7 @@ -- ls-project - show project information -*- Lua -*- -require("e2local") +require("e2lib") require("e2tool") local err = require("err") diff --git a/local/new-source.lua b/local/new-source.lua index c3e4780..ac8dca5 100644 --- a/local/new-source.lua +++ b/local/new-source.lua @@ -28,7 +28,7 @@ -- e2-new-source - add new source onto an existing server -*- Lua -*- -require("e2local") +require("e2lib") require("e2tool") local generic_git = require("generic_git") local cache = require("cache") diff --git a/local/playground.lua b/local/playground.lua index 9e7b900..4b5393a 100644 --- a/local/playground.lua +++ b/local/playground.lua @@ -27,7 +27,7 @@ -- playground - enter existing chroot(1) environment -*- Lua -*- -require("e2local") +require("e2lib") require("e2tool") require("e2build") local err = require("err")