From e86821595639434245611929b18445278e321c68 Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Fri, 18 Oct 2013 18:06:02 -0300 Subject: Make make-manifest more fool-proof, for values of "fool" equalling Hisham --- src/luarocks/make_manifest.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/luarocks/make_manifest.lua b/src/luarocks/make_manifest.lua index a698f830..53fffc88 100644 --- a/src/luarocks/make_manifest.lua +++ b/src/luarocks/make_manifest.lua @@ -8,6 +8,8 @@ local index = require("luarocks.index") local cfg = require("luarocks.cfg") local util = require("luarocks.util") local deps = require("luarocks.deps") +local fs = require("luarocks.fs") +local dir = require("luarocks.dir") help_summary = "Compile a manifest file for a repository." @@ -31,10 +33,19 @@ function run(...) util.printout("Making manifest for "..repo) + if repo:match("/lib/luarocks") and not flags["local-tree"] then + util.warning("This looks like a local rocks tree, but you did not pass --local-tree.") + end + local ok, err = manif.make_manifest(repo, deps.get_deps_mode(flags), not flags["local-tree"]) if ok and not flags["local-tree"] then util.printout("Generating index.html for "..repo) index.make_index(repo) end + if flags["local-tree"] then + for luaver in util.lua_versions() do + fs.delete(dir.path(repo, "manifest-"..luaver)) + end + end return ok, err end -- cgit v1.2.3-55-g6feb