apparently pacman checks irrelevant network drives for space
Description / Steps to reproduce the issue
run pacman -Suy, accept Proceed with installation, then pacman runs fast except for the checking available disk space which is, apparently, done once for each package being installed (why?!) and is very slow.
Expected behavior
free disk space is a single system call, so it should be quite fast, unless network is involved.
Actual behavior
when installing, say, 7 packages, each of the 7 take a lot of time here:
(3/7) checking available disk space [#############------------------] 42%
Verification
- [X] I have verified that my MSYS2 is up-to-date before submitting the report (see https://www.msys2.org/docs/updating/)
Windows Version
MINGW64_NT-10.0-19045
Are you willing to submit a PR?
No response
You can disable that check by commenting out CheckSpace in /etc/pacman.conf file. More info man 5 pacman.conf https://man.archlinux.org/man/pacman.conf.5
Do you have any evidence that it is accessing network drives, or just that it is slow? https://github.com/msys2/MSYS2-packages/issues/4176 I believe it is trying to stat all of the files the packages will install as part of this, and that's where the slowness is from, not any network access.
Do you have any evidence that it is accessing network drives, or just that it is slow? #4176 I believe it is trying to stat all of the files the packages will install as part of this, and that's where the slowness is from, not any network access.
No, alas, no evidence.
The temporary work around is to disable pacman checking the disk space::
# Comment out "CheckSpace" in /etc/pacman.conf
cd /etc && cp pacman.conf pacman.conf.bak && sed -i 's/^CheckSpace/#CheckSpace/' pacman.conf