ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

Update install-prereqs-arch.sh

Open igoutta opened this issue 9 months ago • 6 comments

  • Added the much needed opencv-python package so that MAVProxy's console and map are finally displayed.
  • Automatic and improved way to add the venv and path variables to the shell config file, whether you use bash or zsh.
  • Corrected the AUTOPILOT_TOOLS directory with a reliable source for obtaining it.
  • Removed the annoying set -x which filled the whole terminal with the result of every command.

igoutta avatar Feb 21 '25 21:02 igoutta

I deleted the QUIET option because it was completely unused. Funny because the set -x was really loud.

igoutta avatar Feb 21 '25 21:02 igoutta

Hi @igoutta,

thanks for this. Two small things:

  1. could you update the commit title to start with "Tools: "? If you peek at our commit list you'll see we always do this because it makes backporting easier. To be clear, i mean the commit title, not the PR title.
  2. could you rebase on master to remove the merge commit? We don't accept merge commits into the master branch again because it makes backporting easier when we don't have them

rmackay9 avatar Feb 28 '25 05:02 rmackay9

Hi, @rmackay9.

I'm happy to help. I rewrote the whole script without changing or adding any packages except the ones mentioned above.

The review of changes:

  • Upgraded algorithm (with help of Deepseek, ngl).
  • QUIET mode came back and it's actually quiet.
  • No more change directory to do stuff.
  • Lots of verifications to ensure every step is properly functioning at the end.
  • Some advices at the end.

I have tested this script a lot in this computer. I tried to be at resourceful as I could, so I really wish anyone with Arch could enjoy using it. I personally disagree with the handling of the virtual enviroment but that's another history.

I noticed some path errors which I corrected, I guess the translation coming from Ubuntu to Arch. The use of the script directory in the git command when you really need the root of the repository. The function of prompt returning 1, which basically means a fail of the script. Now it return 0 but still do the intented function.

I hope it works this time. Sincerely.

igoutta avatar Feb 28 '25 06:02 igoutta

I wonder if @khancyr is perhaps the best one to review this..

rmackay9 avatar Feb 28 '25 06:02 rmackay9

I am seriously not a fan of a complete rewrite here - including functional changes.

Please do this in more incremental steps, and bear in mind this script isn't stand-alone, it's part of a collection of scripts which are all much-of-a-muchness and need to be maintained by the same people.

I'm simply trying to support a script that didn't even gives the Arch user a functional installation. The original script lacked of so many essential things, starting from the OpenCV library in the Python packages, needed to have GUI for MavProxy. The zero use of the quiet option, and set -x literally bloating the screen without a real debug. Lack of self-awareness about the used shell.

If you want to make changes make them, perharps checking in the full extend if the Python binary from the virtual envoriment exists, or is not corrupt. Things that takes time or a discussion to understand if they're needed, because they're the product of another tools used in the script.

igoutta avatar Mar 12 '25 14:03 igoutta

I notice this claims to

Added the much needed opencv-python package so that MAVProxy's console and map are finally displayed.

I'm having a problem where console and map are not displayed on my WSL2 22.04 installation, is this going to solve that?

timtuxworth avatar Jun 02 '25 12:06 timtuxworth

I'm having a problem where console and map are not displayed on my WSL2 22.04 installation, is this going to solve that?

No. This PR is for arch Linux, not Ubuntu Linux

peterbarker avatar Jun 07 '25 03:06 peterbarker

Hi @igoutta,

thanks for this. Two small things:

  1. could you update the commit title to start with "Tools: "? If you peek at our commit list you'll see we always do this because it makes backporting easier. To be clear, i mean the commit title, not the PR title.
  2. could you rebase on master to remove the merge commit? We don't accept merge commits into the master branch again because it makes backporting easier when we don't have them

Finally changed that commit xd

igoutta avatar Jul 03 '25 16:07 igoutta

I notice this claims to

Added the much needed opencv-python package so that MAVProxy's console and map are finally displayed.

I'm having a problem where console and map are not displayed on my WSL2 22.04 installation, is this going to solve that?

I could try to check this script as well. Last time I tried it, it worked fine, but I quite not really remember it correctly. I will try to make some time for it this weekend.

Edit: I didn't checked. i completely forgot. But also I read my WSL bash history and I didn't make anything special when I installed the development enviroment with the script, besides update and upgrade beforehand.

igoutta avatar Jul 03 '25 16:07 igoutta