diff options
| author | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-04-23 18:56:38 +0000 |
|---|---|---|
| committer | hisham <hisham@9ca3f7c1-7366-0410-b1a3-b5c78f85698c> | 2009-04-23 18:56:38 +0000 |
| commit | 08df24ac4f1ac5ef3b5bb59629e65e4b90b2a51d (patch) | |
| tree | 6de5c006b1d2c29fc98ffd7815a6d8ddee7d4917 /src/luarocks.lua | |
| parent | 940d5b91d3372c46b690027e14af85f41c0cffd8 (diff) | |
| download | luarocks-08df24ac4f1ac5ef3b5bb59629e65e4b90b2a51d.tar.gz luarocks-08df24ac4f1ac5ef3b5bb59629e65e4b90b2a51d.tar.bz2 luarocks-08df24ac4f1ac5ef3b5bb59629e65e4b90b2a51d.zip | |
LuaRocks can now use itself to load its own dependencies!
git-svn-id: http://luarocks.org/svn/luarocks/trunk@13 9ca3f7c1-7366-0410-b1a3-b5c78f85698c
Diffstat (limited to 'src/luarocks.lua')
| -rw-r--r-- | src/luarocks.lua | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/luarocks.lua b/src/luarocks.lua index fad62e07..aef93363 100644 --- a/src/luarocks.lua +++ b/src/luarocks.lua | |||
| @@ -61,17 +61,16 @@ local function add_context(name, version, manifest) | |||
| 61 | for _, dep in ipairs(pkgdeps) do | 61 | for _, dep in ipairs(pkgdeps) do |
| 62 | local package, constraints = dep.name, dep.constraints | 62 | local package, constraints = dep.name, dep.constraints |
| 63 | 63 | ||
| 64 | for _, tree in pairs(rocks_trees) do do | 64 | for _, tree in pairs(rocks_trees) do |
| 65 | local entries = tree.manifest.repository[package] | 65 | local entries = tree.manifest.repository[package] |
| 66 | if entries then | 66 | if entries then |
| 67 | break -- continue for | 67 | for version, packages in pairs(entries) do |
| 68 | end | 68 | if (not constraints) or deps.match_constraints(deps.parse_version(version), constraints) then |
| 69 | for version, packages in pairs(entries) do | 69 | add_context(package, version, tree.manifest) |
| 70 | if (not constraints) or deps.match_constraints(deps.parse_version(version), constraints) then | 70 | end |
| 71 | add_context(package, version, tree.manifest) | ||
| 72 | end | 71 | end |
| 73 | end | 72 | end |
| 74 | end end | 73 | end |
| 75 | end | 74 | end |
| 76 | end | 75 | end |
| 77 | 76 | ||
