diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 14:49:22 -0300 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2018-07-01 21:32:40 -0300 |
commit | eec12737d4003f3078134468215d4c16fb36c2be (patch) | |
tree | 918d74f3f2b035e6e19bd327d2878b8a41337b72 /src | |
parent | 3a4459cb5c4e8b1a79524346ce75718e02aaf038 (diff) | |
download | luarocks-eec12737d4003f3078134468215d4c16fb36c2be.tar.gz luarocks-eec12737d4003f3078134468215d4c16fb36c2be.tar.bz2 luarocks-eec12737d4003f3078134468215d4c16fb36c2be.zip |
write_rockspec: cleanup all rockspec internal fields
Diffstat (limited to 'src')
-rw-r--r-- | src/luarocks/cmd/write_rockspec.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/luarocks/cmd/write_rockspec.lua b/src/luarocks/cmd/write_rockspec.lua index cc218bde..d3ec7b0d 100644 --- a/src/luarocks/cmd/write_rockspec.lua +++ b/src/luarocks/cmd/write_rockspec.lua | |||
@@ -192,9 +192,19 @@ local function rockspec_cleanup(rockspec) | |||
192 | rockspec.source.file = nil | 192 | rockspec.source.file = nil |
193 | rockspec.source.protocol = nil | 193 | rockspec.source.protocol = nil |
194 | rockspec.source.identifier = nil | 194 | rockspec.source.identifier = nil |
195 | rockspec.source.dir = nil | ||
196 | rockspec.source.dir_set = nil | ||
197 | rockspec.source.pathname = nil | ||
195 | rockspec.variables = nil | 198 | rockspec.variables = nil |
196 | rockspec.name = nil | 199 | rockspec.name = nil |
197 | rockspec.format_is_at_least = nil | 200 | rockspec.format_is_at_least = nil |
201 | rockspec.local_abs_filename = nil | ||
202 | rockspec.rocks_provided = nil | ||
203 | for _, list in ipairs({"dependencies", "build_dependencies", "test_dependencies"}) do | ||
204 | if rockspec[list] and not next(rockspec[list]) then | ||
205 | rockspec[list] = nil | ||
206 | end | ||
207 | end | ||
198 | end | 208 | end |
199 | 209 | ||
200 | function write_rockspec.command(flags, name, version, url_or_dir) | 210 | function write_rockspec.command(flags, name, version, url_or_dir) |