Git Product home page Git Product logo

Comments (3)

bofm avatar bofm commented on June 19, 2024
root@451030127e78:/opt/tarantool/zzz# $(sleep 0.1 && pstree -paU > ps.txt)& tarantoolapp dep
[1] 1229
Tarantool version: 1.9.0-4-g195d4462d
Using the following options:
---
--tree: .rocks
--meta-file: ./meta.yaml
--only:
--luarocks-config: /root/.luarocks/config.lua
...

[zzz] Already have proper rocks servers
[zzz] Installing dependencies...
[zzz] Installing tarantool dep 'https://raw.githubusercontent.com/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'
[zzz] tarantoolctl rocks install https://raw.githubusercontent.com/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...

Error: No results matching query were found.
/usr/local/share/lua/5.1/tarantoolapp/commands/dep.lua:72: [zzz] tarantoolctl rocks install https://raw.githubusercontent.com/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz failed
stack traceback:
	...l/lib/luarocks/rocks/tarantoolapp/scm-1/bin/tarantoolapp:81: in main chunk
[1]+  Done                    $(sleep 0.1 && pstree -paU > ps.txt)
root@451030127e78:/opt/tarantool/zzz# cat ps.txt
bash,1
  ├─bash,1229
  │   └─bash,1231
  │       └─pstree,1243 -paU
  └─lua5.1,1230 -epackage.path="/root/.luarocks/share/lua/5.1/?.lua;/root/.luarocks/share/lua/5.1/?/init.lua;/usr/local/share/lua/5
      └─sh,1234 -c tarantool /usr/local/lib/luarocks/rocks/tarantoolapp/scm-1/bin/tarantoolapp dep
          └─tarantool,1235 /usr/local/lib/luarocks/rocks/tarantoolapp/scm-1/bin/tarantoolapp dep
              ├─sh,1238 -c tarantoolctl rocks install https://raw.githubusercontent.com/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
              │   └─tarantool,1239 /usr/bin/tarantoolctl rocks install ...
              │       └─(sh,1244)
              └─{coio},1237

Here is the process tree of tarantoolapp dep command. Something here is not propagating the exit code to the parent process.

from tarantoolapp.

bofm avatar bofm commented on June 19, 2024

Trying to debug...

I added a print statement here

if _TARANTOOL == nil then
	local code = os.execute("exec tarantool "..arg[0].." "..table.concat(arg, ' '))
	print('code', code)  -- <----- here
	os.exit(code)
end

and the code appears to be 256

$ make dep
tarantoolapp dep --meta-file ./meta.yaml --tree ./.rocks
Tarantool version: 1.9.0-4-g195d4462d

Error: No results matching query were found.
Using the following options:
---
--tree: ./.rocks
--meta-file: ./meta.yaml
--only:
--luarocks-config: /root/.luarocks/config.lua
...

[zzz] Patch /root/.luarocks/config.lua with proper rocks servers
[zzz] Installing dependencies...
[zzz] Installing tarantool dep 'https://raw.githubusercontent.com/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz'
[zzz] tarantoolctl rocks install https://raw.githubusercontent.com/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz...
/usr/local/share/lua/5.1/tarantoolapp/commands/dep.lua:72: [zzz] tarantoolctl rocks install https://raw.githubusercontent.com/zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz failed
stack traceback:
	...l/lib/luarocks/rocks/tarantoolapp/scm-1/bin/tarantoolapp:81: in function <...l/lib/luarocks/rocks/tarantoolapp/scm-1/bin/tarantoolapp:80>
	[C]: in function 'error'
	/usr/local/share/lua/5.1/tarantoolapp/commands/dep.lua:72: in function 'tarantoolctl_install'
	/usr/local/share/lua/5.1/tarantoolapp/commands/dep.lua:185: in function 'run'
	...l/lib/luarocks/rocks/tarantoolapp/scm-1/bin/tarantoolapp:78: in function <...l/lib/luarocks/rocks/tarantoolapp/scm-1/bin/tarantoolapp:77>
	[C]: in function 'xpcall'
	...l/lib/luarocks/rocks/tarantoolapp/scm-1/bin/tarantoolapp:76: in main chunk
code	256

And this is why we get exit code 0 in the end.

root@739adb137718:/opt/tarantool# lua; echo "$?"
Lua 5.1.5  Copyright (C) 1994-2012 Lua.org, PUC-Rio
> os.exit(256)
0

Any ideas?

from tarantoolapp.

bofm avatar bofm commented on June 19, 2024

I think the solution is to check if os.execute(...) == 0.

os.exit(os.execute("exec tarantool "..arg[0].." "..table.concat(arg, ' ')) == 0 and 0 or 1)

from tarantoolapp.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.