[Libre-soc-bugs] [Bug 714] Coriolis2 Installation as Normal User Script
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Sat Oct 2 08:47:50 BST 2021
https://bugs.libre-soc.org/show_bug.cgi?id=714
--- Comment #14 from andrey at technepisteme.xyz ---
(In reply to Luke Kenneth Casson Leighton from comment #3)
> https://gitlab.lip6.fr/vlsi-eda/coriolis/-/issues/48
>
> andrey a workaround is to do "/bin/bash -c coriolisEnv.py >" blah blah
>
> or use the EOF trick again from comment 2:
>
> /bin/bash << EOF
> .... coriolisEnv.py > blahblah
> EOF
Good idea, I'll try both of those.
In my test script had the following (modified coriolisEnv.py to only print the
shell):
# First method
/bin/bash -c /home/$USER/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py
# Second method
/bin/bash << EOF
/home/$USER/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py
EOF
The standard output:
Test script for checking coriolisEnv.py!
Shell: test-coriolisen
whichCommand.stdout.readlines(): []
Shell: bash
whichCommand.stdout.readlines(): ['/usr/bin/bash\n']
Section on "-c" in the bash man pages:
"If the -c option is present, then commands are read from the
first non-option argument command_string. If there are argu-
ments after the command_string, the first argument is as-
signed to $0 and any remaining arguments are assigned to the
positional parameters. The assignment to $0 sets the name of
the shell, which is used in warning and error messages."
Is "/bin/bash -c" not going to work because of $0? I tried adding "bash" after
the python script (/bin/bash -c .../coriolisEnv.py bash) to see if that would
set $0, but didn't work.
So the first method doesn't work, however the second does, so I'll stick to the
second one for now.
(In reply to Luke Kenneth Casson Leighton from comment #4)
> Andrey, this one we can put as a "documentation" budget,
> if you can update the tutorials and pages involved that
> explain how to use these two scripts.
Sure. Is it just the coriolis2 wiki page I need to work on?
https://libre-soc.org/HDL_workflow/coriolis2/
There's also the devscripts wiki:
https://libre-soc.org/HDL_workflow/devscripts/
where I can include brief descriptions of the other scripts. Is that worth
doing?
> also, Jean-Paul will be doing a coriolis_install_python3 which
> should also be mentioned.
Sure, I'll mention what needs to be updated to work with python3. Now that we
found the causes of my issues, a python3 version *might* work, so I'll create a
second script called "coriolis-install-py3" (with a disclaimer saying it
probably doesn't work yet) after I'm done with "coriolis-install" and updated
the documentation.
(In reply to Jean-Paul.Chaput from comment #13)
> (In reply to Luke Kenneth Casson Leighton from comment #12)
> > or, hunt back from parent process parent process parent process until
> > hitting a shell.
>
> Yes, that was also my conclusion *if* we want to keep the
> auto-detection... Sight!
Well, at least we can use the trick Luke mentioned in comment #3 for now.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list