msys2 / MSYS2-packages

Package scripts for MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
1.29k stars 485 forks source link

apparently pacman checks irrelevant network drives for space #4720

Open sam-s opened 3 months ago

sam-s commented 3 months ago

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

Windows Version

MINGW64_NT-10.0-19045

Are you willing to submit a PR?

No response

Biswa96 commented 3 months ago

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

jeremyd2019 commented 3 months ago

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.

sam-s commented 3 months ago

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.

eabase commented 1 month ago

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