-
Notifications
You must be signed in to change notification settings - Fork 428
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LuaRocks 2.0.7 bug: /usr/local/share/lua/5.1//luarocks/fs/lua.lua:582: bad argument #2 to 'chmod' (bad mode) #53
Comments
After some digging, I think I found it. Looks like you're using LuaPosix and, to my surprise, it doesn't support octal mode setting. I've just pushed a change to use the textual notation. This should be more "portable". Please confirm if this fixes your issue. |
Thanks for fast response, though now I got something new: user@ubuntu:~/projects/pk-hb/server/lib/pk-tools$ sudo luarocks make rockspec/pk-tools.pk-ensure-nginx-site-enabled-scm-1.rockspec Error: LuaRocks 2.0.7 bug (please report at luarocks-developers@lists.sourceforge.net). /usr/local/share/lua/5.1//luarocks/dir.lua:12: assertion failed! stack traceback: [C]: in function 'assert' /usr/local/share/lua/5.1//luarocks/dir.lua:12: in function 'base_name' /usr/local/share/lua/5.1//luarocks/build.lua:59: in function 'install_files' /usr/local/share/lua/5.1//luarocks/build.lua:206: in function (tail call): ? (tail call): ? [C]: in function 'xpcall' /usr/local/share/lua/5.1//luarocks/command_line.lua:151: in function 'run_command' /usr/local/bin/luarocks:23: in main chunk [C]: ? |
I committed a fix for that. Please let me know how things go. If things run smoothly I'll pack a release in the coming days. |
Thanks alot, new code worked for me! |
I'm getting this error in luarocks 2.2.0
|
Can you run the luarocks command again, with --verbose flag, and paste the results here? |
This actually happens while using luarocks as a Lua module in my application, not while running the luarocks executable. It's during calling |
Ok, can you add util.printerr("file: ".. tostring(file) .. " mode: " .. tostring(mode)) before line 740? The first argument seems to require a valid path. Let's check that too. Also, which version of LuaPosix are you using? |
I'm using luarocks 2.2.0, and LuaPosix 33.2.1. The first argument is indeed a valid file path.
|
Try that in a script:
According to http://luaposix.github.io/luaposix/modules/posix.html#chmod it seems that your mode string is not valid. All those dashes at the start are valid? Also, which version of LuaPosix (not LuaRocks) are you using? |
LuaPosix 33.2.1 (latest atm), but I'm not calling |
Do you have a tar file that works so we can compare them and see if that's |
We have code in lua.lua that converts octal notation to rwx notation because of an old LuaPosix bug. Looks like tar is giving out lots of zeros in its mode string ("000644"). |
an octal mode string that's too long. Fixes #53.
I pushed a fix for that, @amrhassan, please take a look. |
That seems to fix it. Thank you @hishamhm :) |
Got some strange bug while making rockspec:
The text was updated successfully, but these errors were encountered: