Describe the bug
Installing azure-cli tools from the official Microsoft repos stalls for a very long time when installed using apt on Debian/Ubuntu-based distros on Windows Subsystem for Linux.
It can often stall for 10-25 minutes for an unclear purpose on WSL, see these reports here.
To Reproduce
Follow steps to add azure-cli repo to /etc/apt/sources.list via apt on Debian or Ubuntu.
sudo apt-get update
sudo apt install azure-cli -y
Expected behavior
azure-cli is installed without long delays.
Environment summary
Debian stretch on Windows Subsystem for Linux
Additional context
Add any other context about the problem here.
The delay is the extensive install script in the background.
I don't think this should be closed. The install time on Linux compared to other platforms is insane and makes for a terrible and confusing experience.
Time spent in installation seems to be dpkg:
$ ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
...
root 23697 47.5 0.1 49808 38040 pts/5 Ss 13:58 7:38 /usr/bin/dpkg --status-fd 30 --no-triggers --unpack --auto-deconfigure --recursive /tmp/apt-dpkg-install-rS1iJh`
This triggers every single update for me, 30-40 minutes easily.
The time spent is because Azure-CLI is unpacking it's own Python 2 distribution. It is slow because WSL1 file I/O is slow. Some status updates during the install could be implemented.
@sirredbeard I'm guessing the python2 dependency isn't going anywhere soon, but how about taking it out into separate package and "just" sym/hardlinking into it from the proper azure-cli package? Again guessing that rate of change in python2 stuff is much lower than az itself
@pasisavolainen Well Python 2 reaches EOL in 7 months. I imagine they will move to Python 3 and will still bundle it.
Most helpful comment
I don't think this should be closed. The install time on Linux compared to other platforms is insane and makes for a terrible and confusing experience.